pjd

0.0.1 MIT/X Consortium License    
  UNRATED

  327 downloads

The Python Java Disassembler

description

download

specs

pjd is a brand-spanking-new-buggy-alpha Java bytecode disassembler library written in Python. It is very simple and isn't intended to be fancy nor meet any particular goal other than to be easy to use.

Examples

By default, pyjd lists all public fields and methods. You control the scope by passing --private and --protected, which enable the display of their respective scopes. Local and public members are always displayed.

$ ./pyjd --classpath=test/HelloWorld.jar HelloWorld
public class HelloWorld extends java/lang/Object {
 public void < init >();
 public void main(java.lang.String[] paramString);
}


To display type and call signatures, use -s or --sigs:

$ ./pyjd --classpath=test/HelloWorld.jar -sigs HelloWorld
public class HelloWorld extends java/lang/Object {
 public void < init >();
 Signature: ()V
 public void main(java.lang.String[] paramString);
 Signature: ([Ljava/lang/String;)V
}


To disassemble method bodies, use -d or --dism:

$ ./pyjd --classpath=test/HelloWorld.jar --dism HelloWorld
public class HelloWorld extends java/lang/Object {
 public void < init >();
 0: aload_0
 1: inokespecial #1 // method -> java/lang/Object.< init >:()V
 4: return
 public void main(java.lang.String[] paramString);
 0: getstatic #2 // field -> java/lang/System.out:Ljava/io/PrintStream;
 3: ldc #3 // string -> Hello, World
 5: inokevirtual #4 // method -> java/io/PrintStream.println:(Ljava/lang/String;)V
 8: return
}
read more   
Last updated on January 24th, 2011

#Java disassembler #Python disassembler #bytecode disassembler #Python #Java #disassembler #bytecode

0 User reviews so far.

SUBMIT