diff options
| author | 2018-12-08 11:21:18 +0100 | |
|---|---|---|
| committer | 2018-12-08 11:21:18 +0100 | |
| commit | 4bc3afe4ff08b9f0c08952ec7f6e0ac930280cc5 (patch) | |
| tree | 99e43aa385d7fa1248c7fe474c022db55c364592 /src/main/java/cuchaz/enigma/CommandMain.java | |
| parent | work around Procyon weirdness (diff) | |
| download | enigma-fork-4bc3afe4ff08b9f0c08952ec7f6e0ac930280cc5.tar.gz enigma-fork-4bc3afe4ff08b9f0c08952ec7f6e0ac930280cc5.tar.xz enigma-fork-4bc3afe4ff08b9f0c08952ec7f6e0ac930280cc5.zip | |
add barebones plugin framework, cleanup
Diffstat (limited to 'src/main/java/cuchaz/enigma/CommandMain.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/CommandMain.java | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/main/java/cuchaz/enigma/CommandMain.java b/src/main/java/cuchaz/enigma/CommandMain.java index 59eb1b6..6c8caa4 100644 --- a/src/main/java/cuchaz/enigma/CommandMain.java +++ b/src/main/java/cuchaz/enigma/CommandMain.java | |||
| @@ -28,10 +28,6 @@ public class CommandMain { | |||
| 28 | deobfuscate(args); | 28 | deobfuscate(args); |
| 29 | } else if (command.equalsIgnoreCase("decompile")) { | 29 | } else if (command.equalsIgnoreCase("decompile")) { |
| 30 | decompile(args); | 30 | decompile(args); |
| 31 | } else if (command.equalsIgnoreCase("protectify")) { | ||
| 32 | protectify(args); | ||
| 33 | } else if (command.equalsIgnoreCase("publify")) { | ||
| 34 | publify(args); | ||
| 35 | } else if (command.equalsIgnoreCase("convertmappings")) { | 31 | } else if (command.equalsIgnoreCase("convertmappings")) { |
| 36 | convertMappings(args); | 32 | convertMappings(args); |
| 37 | } else { | 33 | } else { |
| @@ -50,8 +46,6 @@ public class CommandMain { | |||
| 50 | System.out.println("\twhere <command> is one of:"); | 46 | System.out.println("\twhere <command> is one of:"); |
| 51 | System.out.println("\t\tdeobfuscate <in jar> <out jar> [<mappings file>]"); | 47 | System.out.println("\t\tdeobfuscate <in jar> <out jar> [<mappings file>]"); |
| 52 | System.out.println("\t\tdecompile <in jar> <out folder> [<mappings file>]"); | 48 | System.out.println("\t\tdecompile <in jar> <out folder> [<mappings file>]"); |
| 53 | System.out.println("\t\tprotectify <in jar> <out jar>"); | ||
| 54 | System.out.println("\t\tpublify <in jar> <out jar>"); | ||
| 55 | System.out.println("\t\tconvertmappings <enigma mappings> <converted mappings> <ENIGMA_FILE|ENIGMA_DIRECTORY|SRG_FILE>"); | 49 | System.out.println("\t\tconvertmappings <enigma mappings> <converted mappings> <ENIGMA_FILE|ENIGMA_DIRECTORY|SRG_FILE>"); |
| 56 | } | 50 | } |
| 57 | 51 | ||
| @@ -71,20 +65,6 @@ public class CommandMain { | |||
| 71 | deobfuscator.writeJar(fileJarOut, new ConsoleProgressListener()); | 65 | deobfuscator.writeJar(fileJarOut, new ConsoleProgressListener()); |
| 72 | } | 66 | } |
| 73 | 67 | ||
| 74 | private static void protectify(String[] args) throws Exception { | ||
| 75 | File fileJarIn = getReadableFile(getArg(args, 1, "in jar", true)); | ||
| 76 | File fileJarOut = getWritableFile(getArg(args, 2, "out jar", true)); | ||
| 77 | Deobfuscator deobfuscator = getDeobfuscator(null, new JarFile(fileJarIn)); | ||
| 78 | deobfuscator.protectifyJar(fileJarOut, new ConsoleProgressListener()); | ||
| 79 | } | ||
| 80 | |||
| 81 | private static void publify(String[] args) throws Exception { | ||
| 82 | File fileJarIn = getReadableFile(getArg(args, 1, "in jar", true)); | ||
| 83 | File fileJarOut = getWritableFile(getArg(args, 2, "out jar", true)); | ||
| 84 | Deobfuscator deobfuscator = getDeobfuscator(null, new JarFile(fileJarIn)); | ||
| 85 | deobfuscator.publifyJar(fileJarOut, new ConsoleProgressListener()); | ||
| 86 | } | ||
| 87 | |||
| 88 | private static Deobfuscator getDeobfuscator(File fileMappings, JarFile jar) throws Exception { | 68 | private static Deobfuscator getDeobfuscator(File fileMappings, JarFile jar) throws Exception { |
| 89 | System.out.println("Reading jar..."); | 69 | System.out.println("Reading jar..."); |
| 90 | Deobfuscator deobfuscator = new Deobfuscator(jar); | 70 | Deobfuscator deobfuscator = new Deobfuscator(jar); |