-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscanner.py
More file actions
71 lines (59 loc) · 1.77 KB
/
Copy pathscanner.py
File metadata and controls
71 lines (59 loc) · 1.77 KB
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
#scanner.py
#test 001! working usage python scanner.py url
'''import sys
from modules import open_dir, headers, clickjack, js_leaks, form_check
def run_scanner(url):
print(f"\n[+] Scanning: {url}\n")
open_dir.scan(url)
headers.scan(url)
clickjack.scan(url)
js_leaks.scan(url)
form_check.scan(url)
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python scanner.py <url>")
sys.exit(1)
run_scanner(sys.argv[1])
'
# scanner.py
from modules import open_dir, headers, clickjack, js_leaks, form_check
def scan_url(url):
results = {
"url": url,
"status": "Scan Complete",
"vulnerabilities": []
}
modules = [open_dir, headers, clickjack, js_leaks, form_check]
for module in modules:
try:
findings = module.scan(url)
if findings:
results["vulnerabilities"].extend(findings)
except Exception as e:
results["vulnerabilities"].append({
"type": "Module Error",
"module": module.__name__,
"error": str(e)
})
return results
'''
from modules import open_dir, headers, clickjack, js_leaks, form_check
def scan_url(url):
results = {
"url": url,
"status": "Scan Complete",
"vulnerabilities": []
}
modules = [open_dir, headers, clickjack, js_leaks, form_check]
for module in modules:
try:
findings = module.scan(url)
if findings:
results["vulnerabilities"].extend(findings)
except Exception as e:
results["vulnerabilities"].append({
"type": "Module Error",
"module": module.__name__,
"error": str(e)
})
return results