feat(cli): add option to change deobfuscation map file (#1117)

Signed-off-by: Skylot <skylot@gmail.com>
This commit is contained in:
Skylot
2021-02-13 14:18:14 +00:00
parent c56d9ac7ce
commit 67def6319e
5 changed files with 39 additions and 2 deletions
@@ -79,6 +79,12 @@ public class JadxCLIArgs {
@Parameter(names = { "--deobf-max" }, description = "max length of name, renamed if longer")
protected int deobfuscationMaxLength = 64;
@Parameter(
names = { "--deobf-cfg-file" },
description = "deobfuscation map file, default: same dir and name as input file with '.jobf' extension"
)
protected String deobfuscationMapFile;
@Parameter(names = { "--deobf-rewrite-cfg" }, description = "force to save deobfuscation map")
protected boolean deobfuscationForceSave = false;
@@ -193,6 +199,7 @@ public class JadxCLIArgs {
args.setRawCFGOutput(rawCfgOutput);
args.setReplaceConsts(replaceConsts);
args.setDeobfuscationOn(deobfuscationOn);
args.setDeobfuscationMapFile(FileUtils.toFile(deobfuscationMapFile));
args.setDeobfuscationForceSave(deobfuscationForceSave);
args.setDeobfuscationMinLength(deobfuscationMinLength);
args.setDeobfuscationMaxLength(deobfuscationMaxLength);
@@ -271,6 +278,10 @@ public class JadxCLIArgs {
return deobfuscationMaxLength;
}
public String getDeobfuscationMapFile() {
return deobfuscationMapFile;
}
public boolean isDeobfuscationForceSave() {
return deobfuscationForceSave;
}