Cython Compilation & Reverse Engineering?

2,949 views
Skip to first unread message

Shalom Rav

unread,
Nov 17, 2010, 7:12:19 PM11/17/10
to cython-users
Hello,

Somebody mentioned to me that code that is written in python (and
similarly to it, code written in C#) can be easily reversed-
engineered.
The same source said that on the other hand, code that was written in C
++ cannot (or, it is very hard) be reversed engineered.

Given the fact that Cython is compiled, can the generated
".so" (Linux) / ".pyd" (Windows) file be easily reversed engineered
like Python code? or rather -- since it is compiled through C -- it
is hard to reverse engineer it (similarly to C++)?

Thanks.

Robert Bradshaw

unread,
Nov 17, 2010, 7:27:01 PM11/17/10
to cython...@googlegroups.com

It's much harder to reverse engineer compiled Cython code than Python
code (essentially, it'd boil down to reverse-engineering
auto-generated C), but given enough effort, no code is impossible to
reverse engineer. That's not why people use Cython though.

- Robert

Sam Hart

unread,
Nov 17, 2010, 7:30:27 PM11/17/10
to cython...@googlegroups.com
On Wed, Nov 17, 2010 at 4:12 PM, Shalom Rav <csharppl...@gmail.com> wrote:

I would assume that what they are referring to is the fact that both
C# and Python have reflection as a feature of their languages (e.g.,
data about the source code construction is available at runtime)....
Though I may be completely guessing incorrectly here...

As far as *that* is concerned, I'll have to defer to others on the
Cython-users list as to whether or not that data remains in the
resultant Cython binaries, because I honestly don't know. If I were to
bet, I would say "yes, reflection is still there" simply because the
resultant Cython binaries can be imported and used by standard Python
code.. but I'm just guessing.

Honestly, it doesn't seem that code obfuscation is the usual thrust
for using Cython though.

                                      ---Sam

Shalom Rav

unread,
Nov 18, 2010, 9:56:43 AM11/18/10
to cython-users
Thanks Robert and Sam for your replies.

On Nov 17, 7:30 pm, Sam Hart <criswelli...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages