forked from YagamiiLight/Cerberus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcerberus.py
executable file
·136 lines (86 loc) · 3.11 KB
/
cerberus.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
import time
import argparse
from core.banner import show_banner
show_banner()
time = time.strftime('%H:%M:%S')
parser = argparse.ArgumentParser()
parser.add_argument('-target', nargs='+', dest='target')
parser.add_argument('-thread', nargs='?', default=7, type=int, dest='thread')
parser.add_argument('-proxy', dest='proxy',action="store_true")
parser.add_argument('-waf',dest='waf',action="store_true")
parser.add_argument('-outfile',nargs='?',dest='outfile')
parser.add_argument('-mail', nargs='?', dest='mail')
parser.add_argument('-cookie',nargs='?',dest='cookie')
parser.add_argument('-subdomains',dest='subdomains',action = "store_true")
parser.add_argument('-file', nargs='?', dest='file')
parser.add_argument('-detectMid', dest='detectmid', action='store_true')
parser.add_argument('-middleware', nargs='?', dest='middleware')
parser.add_argument("--account", nargs = '?',dest = 'account')
parser.add_argument("--password", nargs = '?', dest = 'password')
args = parser.parse_args()
mail = args.mail
waf = args.waf
file = args.file
target = args.target
cookie = args.cookie
detectmid = args.detectmid
middleware = args.middleware
subdomains = args.subdomains
proxy = args.proxy or None
threads = args.thread or 7
outfile = args.outfile
account = args.account
password = args.password
from core.proxies import Proxy
from strike.attack import Attack
from core.colors import red,green,end
from core.subdomain import subdomain
from core.middleware import detect_info
from strike.detect_waf import check_waf
from core.Quicksilver import quicksliver
from strike.Poc.poc_Attack import middleware_vulne
from core.auxiliary import convert_target,get_proxy,load_queue
file_= None
subdomain_queue = None
cookies = None
proxy_queue = None
if file:
file_= str(file)
if cookie:
cookies = cookies
if target:
target = convert_target(target[0])
logger_type = "StreamLogger"
if outfile:
logger_type = "FileLogger"
if mail:
logger_type = "STMPLogger"
if account and password:
account = account
password = password
else:
print(f"{green}[!]{time} Need to provide account and password to login STMP email server{end}")
quit()
if subdomains:
sub = subdomain(target, file = "DNSPod.txt", logger_type = logger_type)
subdomain_set = sub.execution()
subdomain_queue = load_queue(subdomain_set)
if detectmid:
middleware_info = detect_info(target,logger_type)
middleware_vulne(url=target,logger_type = logger_type,middleware_info=middleware_info)
if middleware:
vulne = middleware_vulne(target,logger_type,middleware_type = middleware)
vulne.analyse()
if proxy:
proxies = Proxy(target,logger_type)
proxy_queue = proxies.executor()
if waf:
if proxy:
proxy = get_proxy(proxy_queue)
check_waf(target, logger_type, proxy = proxy)
else:
check_waf(target, logger_type)
module_attack = Attack(target,logger_type,cookie = cookies, subdomain_queue = subdomain_queue,proxy_queue = proxy_queue,file = file_)
execution = module_attack.execution
quicksliver(execution,threads)
print(f"{red}[!!][{time}] Vulnerability scan has finished !{end}")