NVISOsecurity / decompile-py2exe

Decompile py2exe Python 3 generated EXEs
Apache License 2.0
107 stars 44 forks source link

TypeError: unsupported operand type(s) for -: 'unicode' and 'int' #1

Closed cdiraimondi closed 7 years ago

cdiraimondi commented 7 years ago

I attempted executing your script against hashes D4617B49FBD2238144778B3005FE8B47 and 7DBCE29427ADD461DA28AA77BC02C681 from VT and received the following error:

Traceback (most recent call last): File "decompile-py2exe.py", line 170, in <module> Main() File "decompile-py2exe.py", line 165, in Main ProcessFile(args[0], options) File "decompile-py2exe.py", line 143, in ProcessFile ProcessPy2exe(data, options) File "decompile-py2exe.py", line 100, in ProcessPy2exe pythonversion = GetPythonVersion(resource_type.name.string) File "decompile-py2exe.py", line 83, in GetPythonVersion return data[6] - 0x30 + (data[7] - 0x30) / 10.0 TypeError: unsupported operand type(s) for -: 'unicode' and 'int'

DidierStevens commented 7 years ago

Your samples are created with py2exe Python 2.7, decompile-py2exe.py is for Python 3.