-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
31 lines (26 loc) · 1.23 KB
/
setup.py
File metadata and controls
31 lines (26 loc) · 1.23 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
import subprocess
import sys
import argparse
def main():
parser = argparse.ArgumentParser(description="Vulnerability Scanner Setup")
parser.add_argument('--choice', choices=['gui', 'cli'], help="Specify the setup choice (gui/cli)")
args = parser.parse_args()
print("Welcome to the Vulnerability Scanner Setup!")
choice = args.choice
if choice == 'gui':
print("\nSetting up the web-based GUI...")
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"])
print("\nDependencies installed successfully!")
print("\nTo run the web GUI, use the following command:")
print(" python3 scanner.py --web")
except subprocess.CalledProcessError as e:
print(f"\nError installing dependencies: {e}")
print("Please install the dependencies manually by running: pip install -r requirements.txt")
elif choice == 'cli':
print("\nTo run the command-line interface, use the following command:")
print(" python3 scanner.py --target <target_url>")
else:
print("\nInvalid choice. Please run the script again and choose either 'gui' or 'cli'.")
if __name__ == "__main__":
main()