-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathmain.py
61 lines (49 loc) · 1.48 KB
/
main.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
55
56
57
58
59
60
import os
import time
import pyfiglet
def run_PE():
file = input("Enter the path and name of the file : ")
os.system("python3 Extract/PE_main.py {}".format(file))
def run_URL():
os.system('python3 Extract/url_main.py')
def exit():
os.system('exit')
def start():
print(pyfiglet.figlet_format("Malware Detector"))
print(" Welcome to antimalware detector \n")
print(" 1. PE scanner")
print(" 2. URL scanner")
print(" 3. Exit\n")
select = int(input("Enter your choice : "))
if (select in [1,2,3]):
if(select == 1):
run_PE()
choice = input("Do you want to search again? (y/n)")
if(choice not in ['Y','N','n','y']):
print("Bad input\nExiting...")
time.sleep(3)
exit()
else:
if(choice == 'Y' or 'y'):
start()
elif(choice == 'N' or 'n'):
exit()
elif(select == 2):
run_URL()
choice = input("Do you want to search again? (y/n)")
if(choice not in ['Y','N','n','y']):
print("Bad input\nExiting...")
time.sleep(3)
exit()
else:
if(choice == 'Y' or 'y'):
start()
else:
exit()
else:
exit()
else:
print("Bad input\nExiting...")
time.sleep(3)
exit()
start()