-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainScript.py
More file actions
28 lines (24 loc) · 1.07 KB
/
MainScript.py
File metadata and controls
28 lines (24 loc) · 1.07 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
import sys
import hash_saver
import VirusTotal
from colorama import init, Fore, Style
init(autoreset=True) # Automatically resets color after each print
def main():
while True:
print(f"\n{Fore.CYAN}{Style.BRIGHT}=== Malware Hash CLI Tool ==={Style.RESET_ALL}")
print(f"{Fore.YELLOW}1.{Style.RESET_ALL} Generate Hashes from Files")
print(f"{Fore.YELLOW}2.{Style.RESET_ALL} Check a File Hash on VirusTotal")
print(f"{Fore.YELLOW}0.{Style.RESET_ALL} Exit")
choice = input(f"{Fore.GREEN}[?] Choose an option: {Style.RESET_ALL}").strip()
if choice == "1":
folder = input(f"{Fore.GREEN}[?] Enter folder path to scan: {Style.RESET_ALL}").strip()
hash_saver.save_hashes_to_file(folder)
elif choice == "2":
VirusTotal.hash_check_VT()
elif choice == "0":
print(f"{Fore.CYAN}Goodbye!{Style.RESET_ALL}")
sys.exit(0)
else:
print(f"{Fore.RED}[!] Invalid option. Try again.{Style.RESET_ALL}")
if __name__ == "__main__":
main()