-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
71 lines (66 loc) · 2.89 KB
/
run.py
File metadata and controls
71 lines (66 loc) · 2.89 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
71
import importlib
import time
from termcolor import colored
def intro():
print(colored("===============================================", "cyan"))
print(colored(" Web Vulnerability Scanner", "magenta"))
print(colored("===============================================", "cyan"))
print(colored(f" Developed by: Sanjib Behera", "green"))
print(colored(" GitHub: sanjib2006", "green"))
print(colored("===============================================", "cyan"))
print(colored("Choose an option to get started with the test.", "yellow"))
print(colored("===============================================", "cyan"))
time.sleep(1)
def display_menu():
print(colored("\nSelect the test you want to run:", "blue"))
print(colored("0. Manual", "green"))
print(colored("1. Network(port) Scanner", "green"))
print(colored("2. Subdomain Enumeration", "green"))
print(colored("3. Directory Listing", "green"))
print(colored("4. SQL Injection", "green"))
print(colored("5. XSS Detection", "green"))
print(colored("6. Brute Force Attack", "green"))
print(colored("q. Quit", "red"))
def run_choice(choice):
try:
if choice == '0':
module = importlib.import_module('manual')
module.run_manual()
elif choice == '1':
module = importlib.import_module('network_scanner')
module.run_network_scanner()
elif choice == '2':
module = importlib.import_module('subdomain_enumeration')
module.run_subdomain_enumeration()
elif choice == '3':
module = importlib.import_module('directory_listing')
module.run_directory_listing()
elif choice == '4':
module = importlib.import_module('sql_inject')
module.run_sql_injection()
elif choice == '5':
module = importlib.import_module('xss')
module.run_xss_injection()
elif choice == '6':
module = importlib.import_module('brute_force')
module.run_brute_force()
elif choice == 'q':
print(colored("\nThank you for using Web Vulnerability Scanner. Goodbye!", "cyan"))
exit(0)
else:
print(colored("[!] Invalid choice. Please enter a valid number (1-6) or 'q' to quit.", "red"))
except ImportError:
print(colored("[!] Error: Required module not found. Ensure all modules are in the same directory.", "red"))
except Exception as e:
print(colored(f"[!] An error occurred: {e}", "red"))
def main():
intro()
while True:
try:
display_menu()
choice = input(colored("Enter your choice: ", "yellow")).strip().lower()
run_choice(choice)
except KeyboardInterrupt:
print(colored("\n[!] Keyboard interrupt detected. Redisplaying menu...", "red"))
if __name__ == "__main__":
main()