-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
25 lines (23 loc) · 834 Bytes
/
main.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
import scan
def do_magic(target='', targets=[], need_crawl=False, same_domain=True, what_to_scan=[]):
"""
scan controller
:param target:
:param targets:
:param need_crawl:
:param same_domain:
:param what_to_scan:
:return:
"""
vulns = []
if target == '' and len(targets) == 0:
print('Check your targets')
else:
if target != '':
print('Now scan ' + target)
vulns = scan.scan(target, what_to_scan) if not need_crawl else scan.crawl_and_scan(target, what_to_scan, same_domain=same_domain)
if len(targets) > 0:
for url in targets:
print('Now scan ' + url)
vulns = scan.scan(url, what_to_scan) if not need_crawl else scan.crawl_and_scan(url, what_to_scan, same_domain=same_domain)
return vulns