Decompiling cpython-311.so file

20 views
Skip to first unread message

Jameel Safdar

unread,
Jan 31, 2023, 10:26:13 AM1/31/23
to cython-users
Hello Everyone I want to decompile a python file that is encoded into cpython file and the name of the file is :
----------------------------------------
extractor.cpython-311
----------------------------------------
The screenshot of the file is sdf.PNG

Stefan Behnel

unread,
Feb 1, 2023, 4:15:31 AM2/1/23
to cython...@googlegroups.com
Hi,

Jameel Safdar schrieb am 31.01.23 um 14:20:
This seems the wrong list to ask this question since it's not specific to
Cython (but to CPython). Please ask on a general Python mailing list, or
rather a place where people discuss decompiling binary libraries (because
that's what a Python extension module really is).

I would also suggest asking the providers of the library, if you haven't
done that yet. They might help you directly with what you want, which would
be a much easier way than decompiling the library and trying to make sense
of the result yourself.

Stefan

D Woods

unread,
Feb 1, 2023, 2:38:05 PM2/1/23
to cython-users
To expand a little more:
* It definitely isn't possible to completely reverse this an end up with a .pyx/.py file, which I suspect is what you're after.
* It's possible for someone who knows assembly and/or has the right tools to work out the underlying logic from the file. That may not be anyone from this mailing list.
* Because Python is very based around strings there are a lot of strings available to read inside a Cython module (as you can see in the screenshot). That may make it easier to work out the logic.

In short, compiled Cython modules can't be trivially decompiled. However, that also doesn't mean that Cython is a good solution to really obfuscate your code - there's a reasonable amount of information there for someone who knows what they're doing to look at.
Reply all
Reply to author
Forward
0 new messages