Main Content

Disassembling Python and Java - previously compiled code

Archive - Originally posted on "The Horse's Mouth" - 2011-01-29 10:27:33 - Graham Ellis

Most modern languages translate the source code you give into an intermediate byte code prior to it being run, and in can sometimes be useful and instructive to reverse engineer the code to help to understand what's going on within the more arcane elements of the language. Some languages actually provide tools to help you ...

In Python, the dis (for disassemble) module provides the functionality - see [here] for an example. In java, the javap utility with a -c option does the job for you. For Lua, disassembers such as luadec are available third party, and it gets very interesting with PHP, Ruby and Perl, assuming you even have the compiled code available.