Last active
August 29, 2015 14:14
-
-
Save x56/1cba2aca1a31f0facaff to your computer and use it in GitHub Desktop.
PPAlgorithm encodeResource
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# public domain | |
import sys | |
if len(sys.argv) != 3: | |
print "pp_res_deobfuscate.py [input file] [output file]" | |
sys.exit(1) | |
datain = "" | |
dataout = "" | |
with open(sys.argv[1], "rb") as infile: | |
datain = infile.read() | |
for i in range(len(datain)): | |
dataout += chr((i * 0xc * 0x4ec4ec4f >> 0x22) + (i * 0xc * 0x4ec4ec4f >> 0x3f) & 0xef ^ ord(datain[i]) & 0xff) | |
with open(sys.argv[2], "wb") as outfile: | |
outfile.write(dataout) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment