blob: 6a01661b6321474fb46b090722dd70d9dd570da7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
package cuchaz.enigma;
public class CommandMain {
public static void main(String[] args) {
// parse the args
if (args.length < 1) {
printHelp();
return;
}
// process the command
String command = args[0];
if (command.equalsIgnoreCase("deobfuscate")) {
deobfuscate(args);
} else if(command.equalsIgnoreCase("decompile")) {
decompile(args);
} else {
System.out.println("Command not recognized: " + args[0]);
printHelp();
}
}
private static void printHelp() {
System.out.println(String.format("%s - %s", Constants.Name, Constants.Version));
System.out.println("Usage:");
System.out.println("\tjava -jar enigma.jar cuchaz.enigma.CommandMain <command>");
System.out.println("\twhere <command> is one of:");
System.out.println("\t\tdeobfuscate <mappings file> <in jar> <out jar>");
System.out.println("\t\tdecompile <mappings file> <in jar> <out jar>");
}
private static void decompile(String[] args) {
// TODO
throw new Error("Not implemented yet");
}
private static void deobfuscate(String[] args) {
// TODO
throw new Error("Not implemented yet");
}
}
|