I am trying to use uncompyle6 to decompile a
.pyc code. I even tried
--verify option. It says
Successfully decompiled file
but the output only contains strings like
What should I do?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
Something is wrong with your input
.pyc file — probably it isn't a valid Python bytecode file (obtained from a valid
.py source file).
\x90 are hexadecimal codes for bytes which have no printable ASCII representation — mainly above
0x7F (127 decimal), but also the control character \x0b (VT - Vertical Tabulation).
\xb3 is an ASCII character.)
It's standard Python output for non-ASCII characters in binary sequence types (bytes / bytearrays / memoryview):
>>> bytes((33, 50, 65, 97)) # ASCII chars b'!2Aa'
>>> bytes((224, 179, 11, 144)) # non-ASCII (4 of "your" 5 bytes) b'\xe0\xb3\x0b\x90'
The same for your byte sequence with non-ASCII and ASCII codes
(now for a change in hexadecimal):
>>> bytes((0xe0, 0xb3, 0x0b, 0x68, 0x90)) # "your" byte sequence b'\xe0\xb3\x0bh\x90'
.pycfile (obtained from your own valid
.pyfile) to be sure that the output in your question is not a consequence of the invalid