X hits on this document

326 views

0 shares

0 downloads

0 comments

32 / 120

Table 5.3. Jad decompilation of ListArguments.class.

01: package info.reversingproject.listarguments; 02: import java.io.PrintStream; 03: 04: public class ListArguments 05: {

06:

public static void main(String args[])

07:

{

08: 09: 10:

for (int i = 0; i < args.length; i++) System.out.println((new StringBuilder()).append("Argument[") .append(i).append("]:").append(args[i]).toString());

11: 12:

}

}

An advanced programmer who is fluent in the Java Virtual Machine specification

could use a hex editor or a program to modify Java bytecode directly, but this is similar to

editing machine code directly, which is error-prone and difficult. In Section 4, which

covered reversing and patching of machine code, it was determined through discussion

and an animated tutorial that one should work with disassembly to make changes to a

binary executable. However, the result of disassembling Java bytecode is a pseudo-

assembly language, a language that cannot be compiled or assembled but serves to

provide a more abstract, readable representation of the bytecode. Being that directly

editing bytecode is difficult, and that disassembling bytecode results in pseudo-assembly

which cannot be compiled, it would seem that losing Java source code is more dire of a

situation than losing C/C++ source code, but of course this is not the case because, as

we've seen using Jad, Java bytecode can be successfully decompiled to equivalent Java

source code.

24

Document info
Document views326
Page views327
Page last viewedMon Dec 05 00:37:33 UTC 2016
Pages120
Paragraphs2913
Words25794

Comments