-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
21 lines (16 loc) · 707 Bytes
/
main.py
File metadata and controls
21 lines (16 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from scanner import VulnerabilityScanner
from report_generator import generate_html_report
import argparse
def main():
parser = argparse.ArgumentParser(description="Python Vulnerability Scanner")
parser.add_argument("--target", required=True, help="Target IP or range (e.g. 192.168.1.1 or 192.168.1.0/24)")
parser.add_argument("--report", choices=["txt", "html"], default="txt", help="Report format")
args = parser.parse_args()
scanner = VulnerabilityScanner()
results = scanner.scan(args.target)
scanner.print_summary()
if args.report == "html":
generate_html_report(results)
print("\n✅ Scan completed successfully!")
if __name__ == "__main__":
main()