SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 515 | Next

Shon Harris, Allen Harper, Chris Eagle, and Jonathan Ness

"Gray Hat Hacking, Second Edition"

Languages that offer the best opportunity for decompilation are typically
hybrid compiled/interpreted languages such as Java or Python. Both are examples of
languages that are compiled to an intermediate, machine-independent form, generally
called byte code. This machine-independent byte code is then executed by a machinedependent
byte code interpreter. In the case of Java, this interpreter is called a Java Virtual
Machine (JVM). Two features of Java byte code make it particularly easy to decompile.
First, compiled Java byte code files, called class files, contain a significant amount of
descriptive information. Second, the programming model for the JVM is fairly simple, and
its instruction set fairly small. Both of these properties are true of compiled Python (pyc)
files and the Python interpreter as well. A number of open source Java decompilers do an
excellent job of recovering Java source code, including JReversePro and Jad. For Python
pyc files, the decompyle project offers source code recovery services, but as of this writing
the open source version only handles Python files from versions 2.3 and earlier (2.5.1 is
the current Python version at this writing).
Java Decompilation Example The following simple example demonstrates the
degree to which source code can be recovered from a compiled Java class file.


Pages:
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527