From 22cac8f1a25c7d34a94bc5e00c56c0532509071f Mon Sep 17 00:00:00 2001 From: Cuchaz Date: Mon, 30 Mar 2015 22:00:54 -0400 Subject: add publifier --- src/cuchaz/enigma/CommandMain.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/cuchaz/enigma/CommandMain.java') diff --git a/src/cuchaz/enigma/CommandMain.java b/src/cuchaz/enigma/CommandMain.java index 74c0191..41528fe 100644 --- a/src/cuchaz/enigma/CommandMain.java +++ b/src/cuchaz/enigma/CommandMain.java @@ -58,6 +58,8 @@ public class CommandMain { decompile(args); } else if (command.equalsIgnoreCase("protectify")) { protectify(args); + } else if (command.equalsIgnoreCase("publify")) { + publify(args); } else { throw new IllegalArgumentException("Command not recognized: " + command); } @@ -103,6 +105,14 @@ public class CommandMain { deobfuscator.protectifyJar(fileJarOut, new ConsoleProgressListener()); } + private static void publify(String[] args) + throws Exception { + File fileJarIn = getReadableFile(getArg(args, 1, "in jar", true)); + File fileJarOut = getWritableFile(getArg(args, 2, "out jar", true)); + Deobfuscator deobfuscator = getDeobfuscator(null, new JarFile(fileJarIn)); + deobfuscator.publifyJar(fileJarOut, new ConsoleProgressListener()); + } + private static Deobfuscator getDeobfuscator(File fileMappings, JarFile jar) throws Exception { System.out.println("Reading jar..."); -- cgit v1.2.3