JAD 的使用

JAD 的使用
================
1.
安装

[url]http://www.varaneckas.com/sites/default/files/jad/jad158g.win.zip[/url]

2.
使用


E:\bisoft\ex\jad>jad
Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov (jad@kpdus.com).
Usage: jad [option(s)] <filename(s)>
Options: -a - 生成JVM指令作为注释
-af - output fully qualified names when annotating
-b - 产生多余的括号, 如if(a){ f(); }
-clear - clear all prefixes, including the default ones
-d <dir> - 输出文件的目录
-dead - 尝试反编译DEAD代码
-dis - 反汇编方法的字节码(JVM指令)
-f - 生成完全限定名
-ff - 方法之前输出字段
-i - 字段输出默认初始化值
-l<num> - split strings into pieces of max <num> chars (splitstr)
-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 - 不需要确认直接覆盖生成的文件
-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 - 保持输出目录为类的包目录结构
-radix<num>- display integers using the specified radix (8, 10, or 16)
-s <ext> - 输出文件扩展名 (默认: .jad)
-safe - generate additional casts to disambiguate methods/fields
-space - 语句或表达式输出空格

-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

E:\bisoft\ex\jad>



3
示例:

反编译类 HelloWorld.class:

3.1

jad HelloWorld.class


会在当前目录生成 HelloWorld.jad.

如果你想修改生成文件的扩展名为.java, 这样:


jad -s java HelloWorld.class



如果生成的类名字不正确, 一般是嵌套类时, 可以显示指定:

jad -p HelloWorld.class > HelloWorld2.java



指定输出目录:

jad -d build -s java *.class



3.2
反编译整个目录树:

jad -o -r -sjava -d ./build **/*.class



3.3
输出jvm指令:

jad -a -o -r -sjvm -d ./build **/*.class


3.4
参数启用与禁用:
-o 原来为OFF, 则现在反转为ON
-o+ ON或True
-o- OFF或False

3.5
设置默认值:
环境变量:
JAD_OPTIONS=-ff+ -nonlb+ -t+ -space+
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值