-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (33 loc) · 1.16 KB
/
main.py
File metadata and controls
41 lines (33 loc) · 1.16 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
#!/usr/bin/env python3
"""
netsec-toolkit - Network Security Scanning Toolkit
Entry point for the netsec-toolkit CLI application.
DISCLAIMER: This tool is for authorized security testing and educational
purposes only. Unauthorized access to computer systems is illegal.
Always obtain written permission before scanning any network or host.
Usage:
python main.py scan <target> [options]
python main.py map [subnet] [options]
python main.py vuln <target> [options]
python main.py full <target> [options]
Examples:
python main.py scan 192.168.1.1 -p 22,80,443
python main.py scan example.com --profile top100
python main.py map 192.168.1.0/24
python main.py vuln example.com -o vuln_report
python main.py full 192.168.1.1 -o full_report --format html
"""
import sys
from netsec_toolkit.cli import main
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("\n\nScan interrupted by user.")
sys.exit(130)
except ConnectionError as exc:
print(f"\nConnection error: {exc}")
sys.exit(1)
except Exception as exc:
print(f"\nUnexpected error: {exc}")
sys.exit(1)