forked from hash3liZer/Subrake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubrake.py
executable file
·661 lines (559 loc) · 19.4 KB
/
subrake.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
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
import sys
if sys.version_info[0] != 2:
sys.exit( "[~] Currently only works with Python Version 2." )
import optparse
import re
import os
import socket
import time
import ssl
import csv
import requests
import random
import signal
import threading
import string
from dns import resolver
from pull import PULLY
from parser import PARSER
from round import ROUNDER
from handlers import GOOGLE
from handlers import BING
from handlers import YAHOO
from handlers import ASK
from handlers import BAIDU
from handlers import NETCRAFT
from handlers import DNSDUMPSTER
from handlers import VIRUSTOTAL
from handlers import THREATCROWD
from handlers import CRTSEARCH
from BeautifulSoup import BeautifulSoup as soup
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
pull = PULLY()
roll = ROUNDER()
eeips = []
class NMHANDLER:
def __init__(self, dm, eeips):
self.domain = dm
self.eeips = eeips
def query(self, _dm, _type):
_ret = []
try:
_ret = resolver.query(_dm, _type)
except:
pass
return _ret
def def_ip(self):
try:
_ip = socket.gethostbyname( "%s.%s" % ( roll.rstring( ) , self.domain ) )
pull.slasher( "Wildcard: * -> Resolving -> %s" % ( pull.YELLOW + _ip + pull.END ), pull.BOLD, pull.YELLOW )
except:
pull.slasher( "Wildcard: * -> Resolving -> NONE", pull.BOLD, pull.YELLOW )
_ip = ""
return _ip
def def_cn(self):
_cn = self.query( "%s.%s" % ( roll.rstring( ) , self.domain ), "CNAME" )
if _cn:
pull.slasher( "Redirect: * -> Resolving -> %s" % ( pull.YELLOW + str(_cn[0]) + pull.END ), pull.BOLD, pull.YELLOW )
return str(_cn[0])
else:
pull.slasher( "Redirect: * -> Resolving -> NONE", pull.BOLD, pull.YELLOW )
return ""
def def_ps(self):
pull.slasher( "Exclude : * -> Specified -> %s" % (pull.YELLOW + ",".join(self.eeips) + pull.END) )
class NAMESERVER:
RECORDS = []
def __init__(self, _dm, _eeips):
self.domain = _dm
self.eeips = _eeips
self.nameservers = self.query(_dm, "NS")
self.mailservers = self.query(_dm, "MX")
#self.txtrecords = self.query(_dm, "TXT")
def save(self, _ty, _vals):
for _rec in _vals:
self.RECORDS.append( ( _ty, str(_rec) ) )
def get(self):
return self.RECORDS
def query(self, _dm, _type):
_ret = []
try:
_ret = resolver.query(_dm, _type)
except:
pass
self.save( _type, _ret )
return _ret
def push(self):
for (rt, rv) in self.RECORDS:
pull.slasher( pull.YELLOW + rt + pull.END + " - " + rv, pull.BOLD, pull.YELLOW )
def def_ip(self):
try:
_ip = socket.gethostbyname( "%s.%s" % ( roll.rstring( ) , self.domain ) )
pull.slasher( "Wildcard: * -> Resolving -> %s" % ( pull.YELLOW + _ip + pull.END ), pull.BOLD, pull.YELLOW )
except:
pull.slasher( "Wildcard: * -> Resolving -> NONE", pull.BOLD, pull.YELLOW )
_ip = ""
return _ip
def def_cn(self):
_cn = self.query( "%s.%s" % ( roll.rstring( ) , self.domain ), "CNAME" )
if _cn:
pull.slasher( "Redirect: * -> Resolving -> %s" % ( pull.YELLOW + str(_cn[0]) + pull.END ), pull.BOLD, pull.YELLOW )
return str(_cn[0])
else:
pull.slasher( "Redirect: * -> Resolving -> NONE", pull.BOLD, pull.YELLOW )
return ""
def def_ps(self):
pull.slasher( "Exclude : * -> Specified -> %s" % ",".join(self.eeips) )
class ONLINE:
SUBDOMAINS = []
THREADS = 0
def __init__(self, _dm):
self.domain = _dm
self.google = GOOGLE( self, _dm )
self.bing = BING( self, _dm )
self.yahoo = YAHOO( self, _dm )
self.ask = ASK( self, _dm )
self.baidu = BAIDU( self, _dm )
self.netcraft = NETCRAFT( self, _dm )
self.dnsdumpster = DNSDUMPSTER( self, _dm )
self.virustotal = VIRUSTOTAL( self, _dm )
self.crt = CRTSEARCH( self, _dm )
def enumerate(self):
self.google.execute()
self.bing.execute()
self.yahoo.execute()
self.ask.execute()
self.baidu.execute()
self.netcraft.execute()
#self.dnsdumpster.execute()
self.virustotal.execute()
self.crt.execute()
def acquire(self):
return self.SUBDOMAINS
def move(self, _name, _ls):
def push():
string = "{:<14}\t{:<28}".format(_name, len(_ls))
pull.slasher( string, pull.BOLD, pull.YELLOW )
return 0
for ls in _ls:
if ls not in self.SUBDOMAINS:
self.SUBDOMAINS.append( ls )
return push()
def pause(self):
while self.THREADS > 0:
pass
return
class ENGINE:
STOPPRINTER = False
ENGAGER = True
BROOTBRA = False
BROOTBRE = False
ERRORCOU = 0
ERRORSUB = []
CTHREADS = 0
SCOUNTER = 0
LOCK = threading.Semaphore( value = 1 )
RECORD = {
}
HEADERS = {
"User-Agent": roll.AGENT,
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"DNT": "1",
"Connection": "close",
"Upgrade-Insecure-Requests": "1"
}
def __init__( self, _domain, _checklist, _defip, _eeips, _defcn, _osubs, _threads, _eout ):
self.signal = signal.signal(signal.SIGINT, self.ee_handler_1)
self.domain = _domain
self.mthreads = _threads
self.defip = _defip
self.eeips = _eeips
self.defcn = _defcn
self.eoutput = _eout
self.checklist = self.parse( _checklist, _osubs )
def empty_handler(self, sig, fr):
return
def ee_handler_1(self, sig, fr):
self.signal = signal.signal(signal.SIGINT, self.empty_handler)
self.BROOTBRA = True
while self.CTHREADS > 0:
time.sleep(0.5)
self.STOPPRINTER = True
time.sleep(0.5)
pull.linebreak( 1 )
ii = raw_input(pull.DARKCYAN + "[<] " + pull.END + "[E]xit / [S]kip / [C]ontinue: ")
if ii in ('e', 'E'):
pull.linebreak( 1 )
pull.brick( pull.BOLD + "Received Interrupt -><- " + pull.END, pull.BOLD, pull.RED )
elif ii in ('s', 'S'):
self.BROOTBRA = False
self.BROOTBRE = True
self.signal = signal.signal(signal.SIGINT, self.ee_handler_2)
else:
self.BROOTBRA = False
self.signal = signal.signal(signal.SIGINT, self.ee_handler_1)
pass
def ee_handler_2(self, sig, fr):
pull.linebreak( 1 )
pull.brick( pull.BOLD + "Received Interrupt -><- " + pull.END, pull.BOLD, pull.RED )
def parse(self, _wd, _sb):
_list = list(_wd) + list(_sb)
for _ls in _list:
_list[ _list.index(_ls) ] = (_ls + ".%s" % self.domain) if not _ls.endswith( ".%s"%self.domain ) else _ls
return list( set( _list ) )
def fmheaders(self):
mcount = roll.maxcountp( self.domain, self.checklist, "." )
roll.fmreplsb( mcount )
pull.psheada( pull.DARKCYAN, rs=roll.FRESOL, cd=roll.FCODE, sv=roll.FSERVER, sb=roll.FSUBDOM )
def request(self, _subdomain, _port):
'''
_req = "GET / HTTP/1.1\r\nHost: %s\r\nUser-Agent: %s\r\nOrigin: http://%s\r\n\r\n" % (_subdomain, roll.AGENT, _subdomain)
_s = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
_s.settimeout( 10 )
try:
if _port == 443:
_s = ssl.wrap_socket(_s, ssl_version=ssl.PROTOCOL_TLS)
_s.connect((_subdomain, _port))
_s.send( _req )
resp, toadd, datalength = "", _s.recv( 2048 ), 1
while datalength:
datalength = len( toadd )
resp += toadd
if (datalength < 2048) or ("\r\n\r\n" in data):
break
toadd = _s.recv( 2048 )
_s.close()
except:
resp = ""
'''
httpath = ("http://%s" % _subdomain) if _port == 80 else ("https://%s" % _subdomain)
try:
r = requests.get(httpath, headers=self.HEADERS, allow_redirects=False, timeout=10, verify=False)
code = r.status_code
headers = r.headers
except:
code = None
headers = {}
if _subdomain not in self.ERRORSUB:
self.ERRORCOU += 1
self.ERRORSUB.append(_subdomain)
return roll.seperator( code, headers )
def handler(self, _subdomain):
self.CTHREADS += 1
self.RECORD[ _subdomain ] = {
80: {},
443: {},
'ip': '',
'cname': '',
'ports': []
}
rtval = self.request( _subdomain, 80 )
self.RECORD[ _subdomain ][ 80 ] = rtval
rtval = self.request( _subdomain, 443 )
self.RECORD[ _subdomain ][ 443 ] = rtval
self.RECORD[ _subdomain ][ 'ip' ] = roll.iplocator( _subdomain, self.defip )
rsv = roll.formatrsv( self.RECORD[ _subdomain ][ 'ip' ], self.defip, pull.MIXTURE )
cdv = roll.formatcdv( self.RECORD[ _subdomain ][ 80 ][ 'cd' ], self.RECORD[ _subdomain ][ 443 ][ 'cd' ], pull.MIXTURE )
svv = roll.formatsvv( self.RECORD[ _subdomain ][ 80 ][ 'sv' ], self.RECORD[ _subdomain ][ 443 ][ 'sv' ], pull.MIXTURE )
sbv = roll.formatsbv( self.domain, _subdomain )
self.LOCK.acquire()
self.STOPPRINTER = True
time.sleep(0.1)
if self.RECORD[ _subdomain ][ 'ip' ] != self.defip and self.RECORD[ _subdomain ][ 'ip' ] != '' and self.RECORD[ _subdomain ][ 'ip' ] not in self.eeips:
pull.psrowa( '', rsv=rsv, cdv=cdv, svv=svv, sbv=sbv )
self.STOPPRINTER = False
self.LOCK.release()
self.SCOUNTER += 1
self.CTHREADS -= 1
def printer(self):
while self.ENGAGER:
while self.STOPPRINTER:
time.sleep(0.5)
if self.ENGAGER and not self.BROOTBRA:
pull.lflush("STATUS! Remain [%d] Total [%d] ERRORS [%d] " % ( len(self.checklist) - self.SCOUNTER, len(self.checklist), self.ERRORCOU) , pull.DARKCYAN, pull.BOLD)
elif self.BROOTBRA:
pull.lflush("PAUSE! Stopping ... Remain [%d] " % self.CTHREADS, pull.DARKCYAN, pull.BOLD)
def engage(self):
t = threading.Thread(target=self.printer)
t.daemon = True
t.start()
for tocheck in self.checklist:
if self.BROOTBRE:
break
_t = threading.Thread( target=self.handler, args=( tocheck, ) )
_t.daemon = True
_t.start()
while self.CTHREADS >= self.mthreads or self.BROOTBRA:
if self.BROOTBRE:
break
time.sleep( 0.5 )
while self.CTHREADS > 0:
if self.BROOTBRE:
break
time.sleep( 0.5 )
self.ENGAGER = False
if self.eoutput:
fl = open(self.eoutput, "w")
for ee in self.ERRORSUB:
fl.write(ee + "\n")
fl.close()
def engrosser(self, _subdomain, _tsc, _ports):
self.CTHREADS += 1
try:
if self.RECORD[ _subdomain ][ 'ip' ] != self.defip:
self.RECORD[ _subdomain ][ 'cname' ] = roll.cnlocator( _subdomain, self.defcn )
if _tsc:
self.RECORD[ _subdomain ][ 'ports' ] = roll.ptlocator( _subdomain, _ports )
cdv = roll.formatcdv( self.RECORD[ _subdomain ][ 80 ][ 'cd' ], self.RECORD[ _subdomain ][ 443 ][ 'cd' ], pull.MIXTURE )
sbv = roll.formatsbv( self.domain, _subdomain )
ptv = roll.formatptv( self.RECORD[ _subdomain ][ 'ports' ], pull.MIXTURE )
cnv = roll.formatcnv( self.RECORD[ _subdomain ][ 'cname' ], pull.MIXTURE )
self.LOCK.acquire()
if self.RECORD[ _subdomain ][ 'ip' ] != self.defip and self.RECORD[ _subdomain ][ 'ip' ] != '' and self.RECORD[ _subdomain ][ 'ip' ] not in self.eeips:
pull.psrowb( '', cdv=cdv, sbv=sbv, ptv=ptv, cnv=cnv )
self.LOCK.release()
except KeyError:
pass
self.CTHREADS -= 1
def engross(self, _tsc, _ports):
for tocheck in self.checklist:
_t = threading.Thread( target=self.engrosser, args=( tocheck, _tsc, _ports ) )
_t.daemon = True
_t.start()
while self.CTHREADS >= self.mthreads:
time.sleep( 0.5 )
while self.CTHREADS > 0:
time.sleep( 0.5 )
def get(self):
return self.RECORD
class WRITER:
TRASH = set()
BASKETA = {}
BASKETB = {}
RECORD = {}
def __init__(self, _dom, _out, _csv, _sub, _rec, _dip, _eeips, _dcn):
self.domain = _dom
self.output = _out
self.csvout = _csv
self.subdos = _sub
self.record = _rec
self.defipa = _dip
self.eeips = _eeips
self.defcna = _dcn
def screenshot(self, fl):
fl = open(fl, "w")
for (subdomain, fdict) in self.record.items():
if fdict[80]['cd'] != 'ERR':
cd = int(fdict[80]['cd'])
if cd < 300 and cd > 399:
fl.write( "http://" + subdomain + "\n" )
if fdict[443]['cd'] != 'ERR':
cd = int(fdict[443]['cd'])
if cd < 300 and cd > 399:
fl.write( "https://" + subdomain + "\n" )
fl.close()
def nmwritetxt(self):
if self.output:
fl = open( self.output, "w" )
fl.write( "".join([
roll.FRESOL.format("RESOLUTION"),
roll.FCODE.format("[HTTP/HTTPS]"),
roll.FSERVER.format("SERVER"),
roll.FSUBDOM.format("SUBDOMAIN"),
"{:<28.27}".format("CNAME"),
roll.FPORTS.format("PORTS"),
"\n"
]))
for (subdomain, fdict) in self.record.items():
fl.write( "".join([
roll.formatrsv(fdict['ip'], self.defipa, pull.VACANT),
roll.formatcdv(fdict[80]['cd'], fdict[443]['cd'], pull.VACANT),
roll.formatsvv(fdict[80]['sv'], fdict[443]['sv'], pull.VACANT),
roll.formatsbv(self.domain, subdomain),
"{:<28.27}".format(fdict['cname']),
roll.formatptv(fdict['ports'], pull.VACANT),
"\n"
]))
def nmwritecsv(self):
if self.csvout:
fl = csv.writer( open(self.csvout, "w") )
fl.writerow([
"RESOLUTION",
"[HTTP/HTTPS]",
"SERVER",
"SUBDOMAIN",
"CNAME",
"PORTS"
])
roll.FSERVER = "{:<}"
for (subdomain, fdict) in self.record.items():
fl.writerow([
fdict[ 'ip' ],
"[" + fdict[80]['cd'] + "/" + fdict[443]['cd'] + "]",
roll.formatsvv( fdict[80]['sv'], fdict[443]['sv'], pull.VACANT ),
subdomain,
fdict['cname'],
",".join( fdict['ports'] )
])
def flwritetxt(self):
if self.output:
fl = open( self.output, "w" )
fl.write( "".join([
roll.FRESOL.format("RESOLUTION"),
roll.FCODE.format("[HTTP/HTTPS]"),
roll.FSERVER.format("SERVER"),
roll.FSUBDOM.format("SUBDOMAIN"),
"{:<28.27}".format("CNAME"),
roll.FPORTS.format("PORTS"),
"\n"
]) )
for (ip, subdomains) in self.BASKETA.items():
if ip != self.defipa and ip != '' and ip not in self.eeips:
for subdomain in subdomains:
fl.write( "".join([
roll.formatrsv( self.record[ subdomain ]['ip'], self.defipa, pull.VACANT ),
roll.formatcdv( self.record[ subdomain ][80]['cd'], self.record[ subdomain ][443]['cd'], pull.VACANT ),
roll.formatsvv( self.record[ subdomain ][80]['sv'], self.record[ subdomain ][443]['sv'], pull.VACANT ),
roll.formatsbv( self.domain, subdomain ),
"{:<28.27}".format( self.record[ subdomain ][ 'cname' ] ),
roll.formatptv( self.record[ subdomain ]['ports'], pull.VACANT ),
"\n"
]) )
fl.write( "\n" )
def flwritecsv(self):
if self.csvout:
fl = csv.writer( open( self.csvout, "w" ) )
fl.writerow([
"RESOLUTION",
"[HTTP/HTTPS]",
"SERVER",
"SUBDOMAIN",
"CNAME",
"PORTS"
])
roll.FCODE = "{:<}"
roll.FSERVER = "{:<}"
for (ip, subdomains) in self.BASKETA.items():
if ip != self.defipa and ip != '' and ip not in self.eeips:
for subdomain in subdomains:
fl.writerow([
self.record[ subdomain ][ 'ip' ],
roll.formatcdv( self.record[ subdomain ][80]['cd'], self.record[ subdomain ][443]['cd'], pull.VACANT ),
roll.formatsvv( self.record[ subdomain ][80]['sv'], self.record[ subdomain ][443]['sv'], pull.VACANT ),
subdomain,
self.record[ subdomain ][ 'cname' ],
",".join( self.record[ subdomain ]['ports'] )
])
fl.writerow([ " " ])
def writesubs(self):
if self.subdos:
fl = open( self.subdos, 'w' )
for (subdomain, fdict) in self.record.items():
if fdict[ 'ip' ] and fdict[ 'ip' ] != self.defipa and fdict['ip'] not in self.eeips:
fl.write( subdomain + "\n" )
def engage(self):
for (subdomain, fdict) in self.record.items():
if fdict[ 'ip' ] and fdict[ 'ip' ] != self.defipa and fdict[ 'ip' ] not in self.eeips:
self.TRASH.add( fdict[ 'ip' ] )
self.BASKETA[ fdict[ 'ip' ] ] = set()
for ip in self.TRASH:
for (subdomain, fdict) in self.record.items():
if ip == fdict[ 'ip' ]:
self.BASKETA[ ip ].add( subdomain )
self.TRASH = set()
for (subdomain, fdict) in self.record.items():
if fdict[ 'cname' ] and fdict[ 'cname' ] != self.defcna:
self.TRASH.add( fdict[ 'cname' ] )
self.BASKETB[ fdict[ 'cname' ] ] = set()
for cn in self.TRASH:
for (subdomain, fdict) in self.record.items():
if cn == fdict[ 'cname' ]:
self.BASKETB[ cn ].add( subdomain )
def main():
parser = optparse.OptionParser( add_help_option=False )
parser.add_option('-h', '--help', dest='help', action='store_true', default=False)
parser.add_option('-d', '--domain', dest="domain", type="string", default="")
parser.add_option('-w', '--wordlists', dest="wordlists", type="string", default="")
parser.add_option('-t', '--threads', dest="threads", type="int", default=20)
parser.add_option('-o', '--output', dest="output", type="string", default="")
parser.add_option('-c', '--csv', dest="csv", type="string", default="")
parser.add_option('-p', '--ports', dest="ports", type="string", default=roll.PORTS)
parser.add_option('-s', '--search', dest="online", action="store_true", default=False)
parser.add_option('-l', '--low-mode', dest="lmode", action="store_true", default=False)
parser.add_option('-e', '--error-output', dest="eoutput", type="string", default="")
parser.add_option('' , '--screenshots' , dest="sshots" , type="string", default="")
parser.add_option('' , '--filter', dest="filter", action="store_true", default=False)
parser.add_option('' , '--subs', dest="subs", type="string", default="")
parser.add_option('' , '--scan-ports', dest="scan", action="store_true", default=False)
parser.add_option('' , '--skip-dns' , dest="sdns", action="store_true", default=False)
parser.add_option('' , '--exclude-ips', dest="eeips", type=str, default="")
(options, args) = parser.parse_args()
pull.logo()
if options.help:
pull.help(); sys.exit(0)
else:
parser = PARSER( options, args )
pull.gthen( "CREATED ENVIRONMENT. EVERYTHING IN PLACE", pull.BOLD, pull.DARKCYAN )
if not parser.skipdns:
pull.gthen( "DNS Records ->", pull.BOLD, pull.DARKCYAN )
pull.linebreak( 1 )
dnssec = NAMESERVER( parser.domain, parser.eeips )
dnssec.push()
dnsrec = dnssec.get()
pull.linebreak( 1 )
else:
dnssec = NMHANDLER( parser.domain, parser.eeips )
pull.gthen( "False Positive Detection ->", pull.BOLD, pull.DARKCYAN )
pull.linebreak( 1 )
dip = dnssec.def_ip()
dcn = dnssec.def_cn()
dnssec.def_ps()
pull.linebreak( 1 )
if parser.online:
pull.gthen( "Looking for Subdomains Online ->", pull.BOLD, pull.DARKCYAN )
pull.linebreak()
oenum = ONLINE( parser.domain )
oenum.enumerate()
oenum.pause()
osubs = oenum.acquire()
pull.linebreak()
else:
osubs = list()
pull.gthen( "Starting Brute Engine. Validating sub-domains ->", pull.BOLD, pull.DARKCYAN )
pull.linebreak()
eenge = ENGINE( parser.domain, parser.checklist, dip, parser.eeips, dcn, osubs, parser.threads, parser.eoutput )
eenge.fmheaders()
eenge.engage()
pull.linebreak()
pull.gthen( "Starting Brute Gun. Looking For Specifics ->", pull.BOLD, pull.DARKCYAN )
pull.linebreak()
pull.psheadb( pull.DARKCYAN, cdh=roll.FCODE, sbh=roll.FSUBDOM, pth=roll.FPORTS, cnh=roll.FCNAME )
eenge.engross( parser.scan, parser.ports )
pull.linebreak( 1 )
fpush = WRITER(parser.domain, parser.output, parser.csv, parser.subs, eenge.get(), dip, parser.eeips, dcn)
if parser.filter:
pull.gthen( "Filtering Items for You. Suitable for larger assets -><-", pull.BOLD, pull.DARKCYAN )
fpush.engage()
pull.lthen( "Items Filtered. Output Finalized! ", pull.BOLD, pull.GREEN )
pull.linebreak()
if parser.output or parser.csv:
pull.gthen( "Writing Your Desired Output ->", pull.BOLD, pull.DARKCYAN )
pull.linebreak()
fpush.flwritetxt()
fpush.flwritecsv()
else:
if parser.output or parser.csv:
pull.gthen( "Writing Your Desired Output ->", pull.BOLD, pull.DARKCYAN )
pull.linebreak()
fpush.nmwritetxt()
fpush.nmwritecsv()
if parser.sshots:
pull.gthen( "Writing the URLs to be Screenshotted ->", pull.BOLD, pull.DARKCYAN )
pull.linebreak()
fpush.screenshot(parser.sshots)
if parser.subs:
fpush.writesubs()
pull.lthen( "DONE!", pull.BOLD, pull.RED )
if __name__ == "__main__":
main()