1111
1212import java .util .*;
1313
14+ import static org .fusesource .jansi .Ansi .ansi ;
15+
1416public class Config {
1517 public static String codeBase ;
1618
@@ -32,6 +34,9 @@ public class Config {
3234 @ Parameter (names = {"-c" , " --command" }, help = true , description = "RMI this command" )
3335 public static String command = "whoami" ;
3436
37+ @ Parameter (names = {"-v" , " --version" }, description = "Show version" , order = 5 )
38+ public static boolean showVersion ;
39+
3540 @ Parameter (names = {"-g" , " --gadgets" }, description = "Show gadgets" , order = 5 )
3641 public static boolean showGadgets ;
3742
@@ -75,6 +80,22 @@ public static void applyCmdArgs(String[] args) {
7580 System .exit (0 );
7681 }
7782
83+ if (showVersion ){
84+ System .out .println (ansi ().eraseScreen ().render ("" +
85+ " /█████ /██ /██ /███████ /██████ /████████ /██ /██ /██ \n " +
86+ " |__ ██| ███ | ██| ██__ ██|_ ██_/| ██_____/ | ██ |__/ | ██ @|BG_GREEN V2.0|@\n " +
87+ " | ██| ████| ██| ██ \\ ██ | ██ | ██ /██ /██ /██████ | ██ /██████ /██ /██████ @|BG_CYAN Author Nu1r|@\n " +
88+ " | ██| ██ ██ ██| ██ | ██ | ██ | █████ | ██ /██/ /██__ ██| ██ /██__ ██| ██|_ ██_/ \n " +
89+ " /██ | ██| ██ ████| ██ | ██ | ██ | ██__/ \\ ████/ | ██ \\ ██| ██| ██ \\ ██| ██ | ██ \n " +
90+ "| ██ | ██| ██\\ ███| ██ | ██ | ██ | ██ >██ ██ | ██ | ██| ██| ██ | ██| ██ | ██ /██\n " +
91+ "| ██████/| ██ \\ ██| ███████/ /██████| ████████ /██/\\ ██| ███████/| ██| ██████/| ██ | ████/\n " +
92+ " \\ ______/ |__/ \\ __/|_______/ |______/|________/|__/ \\ __/| ██____/ |__/ \\ ______/ |__/ \\ ___/ \n " +
93+ " | ██ \n " +
94+ " | ██ \n " +
95+ " |__/ " ));
96+ System .exit (0 );
97+ }
98+
7899 //获取当前 Jar 的名称
79100 String jarPath = Starter .class .getProtectionDomain ().getCodeSource ().getLocation ().getPath ();
80101 jc .setProgramName ("java -jar JNDI-NU.jar" );
0 commit comments