-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
54 lines (46 loc) · 1.92 KB
/
run.py
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
from core.framework import ExploitFramework
import logging
def log_action(action):
"""Function for logging user actions."""
logging.info(action)
def log_error(error_message):
"""Function for logging errors."""
logging.error(error_message)
if __name__ == "__main__":
print("Welcome to the Exploit Framework!")
log_action("Framework started")
framework = ExploitFramework()
while True:
print("\nAvailable Modules:")
print("1. HTTP Request/Response")
print("2. JavaScript Injection")
print("3. SQL Injection Check")
print("4. XSS Injection Check")
print("5. Exit")
choice = input("Select a module to run: ")
# Log user's choice
log_action(f"User selected module {choice}")
if choice == '1':
url = input("Enter URL: ")
log_action(f"User entered URL for HTTP request: {url}")
framework.run_module("requests", url)
elif choice == '2':
url = input("Enter URL for JavaScript Injection Check: ")
log_action(f"User entered URL for JavaScript Injection: {url}")
framework.run_module("js_injection", url)
elif choice == '3':
url = input("Enter URL for SQL Injection Check: ")
log_action(f"User entered URL for SQL Injection: {url}")
framework.run_module("sql_injection", url)
elif choice == '4':
url = input("Enter URL for XSS Injection Check: ")
log_action(f"User entered URL for XSS Injection: {url}")
framework.run_module("xss_injection", url)
elif choice == '5':
print("Exiting...")
log_action("User exited the framework")
break
else:
error_message = "Invalid choice! Try again."
print(error_message)
log_error(error_message)