[CentralOH] .Pyc files vs .Net reflection

James -- Atlantix james at atlantixeng.com
Tue Mar 22 15:47:57 CET 2011


Eric wrote: """.NET assemblies, regardless of language (C#, IronPython,
etc.) compile down to bytecode (called MSIL) which is roughly equivalent to
Java class files or Python .pyc files.  Just like Java and Python, .NET
"compiled" code only gets converted to machine code at execution time.  MSIL
is just as easily decompiled as Java or Python bytecode. """

 

The unfortunate thing is the that the .Net reflection tool from Redgate is
the #1 downloaded tool in this area, http://www.reflector.net/ and the MSIL
language is highly influenced by C# . The decompile of a .exe in the .net
will yield C# code although redgate says that they can produce C#, VB, or
the IL itself. So IronPython code will not be "brought" back to life with
this tool, albeit it would be interesting to see the C# code produce by the
decompile process from IronPython. Theoretically one would have a program
that would compile back to the same function.  

 

One of the complexity strings that is possible as a barrier is to create to
reverse engineering a python based GUI is to create a .net shell. This is an
extension of the idea where I was mentioning compiling sections of the GUI
code to hide it. This now seems a very real possibility. Specifically, the
.net shell (in my case) is a C# program that 1) is the gui that starts the
main PySide GUI 2) has some database integration and thus creates a thread
between it and the PySide Gui 3) calls a crytopgraphic key either residing
at the PC or via the net 4) May call IronPython or even F# code if need be
for specific "helper" functions

 

Despite all the turmoil at Nokia, PySide released its official version 1.0
around March 10 of this year, and there is a google summer of code program
with Pyside, and it has evolved a bit over the PyQt implementation of Qt to
Python. Enthought is also migrating to PySide. It seems as if there is some
hidden momentum with PySide, and it is a very good tool to use. 

 

It does appear now that a separate language shell with some threads that
integrate to the main program will add a degree of complexity to the
reversal process. 

 

James

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/centraloh/attachments/20110322/f2c169f5/attachment.html>


More information about the CentralOH mailing list