jad使用

反编译class文件

  1. 打印到控制台: jad -p Department.class
  2. 生成源代码(默认jad后缀): jad  Department.class   ==> Department.jad
  3. 生成源代码(java后缀): jad -sjava Department.class  ==> Department.java
  4. 使用-p将反编译后的源代码输出,然后写入到指定文件名的文件里(源码文件实现重命名): jad -p Department.class > hello.java
  5. 将反编译文件输出到指定路径下:  jad -dC:\Users\Administrator\Desktop\ -sjava Employee.class
  6. 使用-p将反编译后的源代码输出到指定路径的指定文件:  jad -p Department.class > C:\Users\Administrator\Desktop\hello.java
  7. 反编译当前目录下的所有字节码文件:  jad -sjava *.class
  8. 把com目录以及子目录下的文件全部反编译: jad -sjava com/**/*.class    文件生成在com目录下,且没有包结构
  9.  把com目录以及子目录下的文件全部反编译并建立和java包一致的文件夹路径: 

jad所有命令:

把jad.exe放到JDKd的bin目录下,就可以在全局任意位置使用了

Options: -a       - generate JVM instructions as comments (annotate)
         -af      - output fully qualified names when annotating
         -b       - generate redundant braces (braces)
         -clear   - clear all prefixes, including the default ones
         -d <dir> - directory for output files
         -dead    - try to decompile dead parts of code (if there are any)
         -dis     - disassembler only (disassembler)
         -f       - generate fully qualified names (fullnames)
         -ff      - output fields before methods (fieldsfirst)
         -i       - print default initializers for fields (definits)
         -l<num>  - split strings into pieces of max <num> chars (splitstr)
         -lnc     - output original line numbers as comments (lnc)
         -lradix<num>- display long integers using the specified radix
         -nl      - split strings on newline characters (splitstr)
         -noconv  - don't convert Java identifiers into valid ones (noconv)
         -nocast  - don't generate auxiliary casts
         -noclass - don't convert .class operators
         -nocode  - don't generate the source code for methods
         -noctor  - suppress the empty constructors
         -nodos   - turn off check for class files written in DOS mode
         -nofd    - don't disambiguate fields with the same names (nofldis)
         -noinner - turn off the support of inner classes
         -nolvt   - ignore Local Variable Table entries (nolvt)
         -nonlb   - don't insert a newline before opening brace (nonlb)
         -o       - overwrite output files without confirmation
         -p       - send all output to STDOUT (for piping)
         -pa <pfx>- prefix for all packages in generated source files
         -pc <pfx>- prefix for classes with numerical names (default: _cls)
         -pe <pfx>- prefix for unused exception names (default: _ex)
         -pf <pfx>- prefix for fields with numerical names (default: _fld)
         -pi<num> - pack imports into one line using .* (packimports)
         -pl <pfx>- prefix for locals with numerical names (default: _lcl)
         -pm <pfx>- prefix for methods with numerical names (default: _mth)
         -pp <pfx>- prefix for method parms with numerical names (default:_prm)
         -pv<num> - pack fields with the same types into one line (packfields)
         -r       - restore package directory structure
         -radix<num>- display integers using the specified radix (8, 10, or 16)
         -s <ext> - output file extension (default: .jad)
         -safe    - generate additional casts to disambiguate methods/fields
         -space   - output space between keyword (if, while, etc) and expression
         -stat    - show the total number of processed classes/methods/fields
         -t<num>  - use <num> spaces for indentation (default: 4)
         -t       - use tabs instead of spaces for indentation
         -v       - show method names while decompiling
         -8       - convert Unicode strings into ANSI strings (ansi)
         -&       - redirect STDERR to STDOUT

 

posted @ 2020-03-19 18:36  alenblue\own  阅读(2009)  评论(0编辑  收藏  举报