forked from c0ll3cti0n/exploitpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagentclient.py
More file actions
37 lines (35 loc) · 1.26 KB
/
Copy pathagentclient.py
File metadata and controls
37 lines (35 loc) · 1.26 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
import sys
import subprocess
import os
host = sys.argv[1]
port = sys.argv[2]
platform = sys.platform
if platform.startswith('win'):
print "Running on Windowss"
print "Starting Exploit Pack - Client.."
print "Connecting to:",host
subprocess.call("cmd.exe /K nc.exe %s %s"%(host,port),shell=True)
elif platform.startswith('linux'):
os.chdir("/tmp")
file = open(port, "w")
file.write("clear\n")
file.write("echo Running on Linux\n")
file.write("echo Starting Exploit Pack - Client..\n")
file.write("echo Connecting to: %s \n"%host)
file.write("nc %s %s\n"%(host,port))
file.close()
subprocess.call("chmod +x %s"%port,shell=True)
subprocess.call("xterm -bg black -fg white -hold -e /tmp/%s"%port,shell=True)
elif platform.startswith('darwin'):
os.chdir("/tmp")
file = open(port, "w")
file.write("clear\n")
file.write("echo Running on OSX\n")
file.write("echo Starting Exploit Pack - Client..\n")
file.write("echo Connecting to: %s \n"%host)
file.write("nc %s %s\n"%(host,port))
file.close()
subprocess.call("chmod +x %s"%port,shell=True)
subprocess.call("open -a Terminal /tmp/%s"%port,shell=True)
else:
print "Sorry I could not detect the platform"