-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
47 lines (29 loc) · 881 Bytes
/
main.py
File metadata and controls
47 lines (29 loc) · 881 Bytes
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
import yaml
from core.recon import run_nmap
from core.fetcher import fetch_exploit
from core.detector import detect_type
from core.generator import generate_http
from core.runner import run_exploit
from core.report import save_report
def load_config():
with open("config.yaml") as f:
return yaml.safe_load(f)
def main():
config = load_config()
target = input("Target IP: ")
exploits = []
if config["recon"]:
exploits = run_nmap(target)
for exploit in exploits:
file = fetch_exploit(exploit)
if not file:
continue
etype = detect_type(file)
if etype == "http":
exploit_file = generate_http(file)
if config["run"]:
run_exploit(exploit_file)
if config["report"]:
save_report(target, exploits)
if __name__ == "__main__":
main()