-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
209 lines (184 loc) · 9.82 KB
/
main.py
File metadata and controls
209 lines (184 loc) · 9.82 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
import socket
import subprocess
import sys
import os
import platform
from datetime import datetime
import colorama
from colorama import Fore, Style
colorama.init(autoreset=True)
def print_banner():
banner = """
██████╗ █████╗ ███████╗██████╗ ███████╗███████╗ ██████╗██╗ ██╗██████╗ ██╗████████╗██╗ ██╗
██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔════╝██╔════╝██╔════╝██║ ██║██╔══██╗██║╚══██╔══╝╚██╗ ██╔╝
██████╔╝███████║███████╗██████╔╝███████╗█████╗ ██║ ██║ ██║██████╔╝██║ ██║ ╚████╔╝
██╔══██╗██╔══██║╚════██║██╔═══╝ ╚════██║██╔══╝ ██║ ██║ ██║██╔══██╗██║ ██║ ╚██╔╝
██║ ██║██║ ██║███████║██║ ███████║███████╗╚██████╗╚██████╔╝██║ ██║██║ ██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
███╗ ███╗██╗ ██╗██╗ ████████╗██╗████████╗ ██████╗ ██████╗ ██╗
████╗ ████║██║ ██║██║ ╚══██╔══╝██║╚══██╔══╝██╔═══██╗██╔═══██╗██║
██╔████╔██║██║ ██║██║ ██║ ██║ ██║ ██║ ██║██║ ██║██║
██║╚██╔╝██║██║ ██║██║ ██║ ██║ ██║ ██║ ██║██║ ██║██║
██║ ╚═╝ ██║╚██████╔╝███████╗██║ ██║ ██║ ╚██████╔╝╚██████╔╝███████╗
╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
made with ❤️ by M1CH & Mar20co
fxck pdf
(last update 10.04.2025)
"""
print(banner)
def main_menu():
try:
while True:
print(f"\n{Fore.GREEN}Menu Principale:{Style.RESET_ALL}")
print("1. Strumenti di Rete")
print("2. Strumenti di Cybersecurity")
print("3. Repo download")
print("4. Esci")
choice = input("Seleziona un'opzione (1-3): ")
if choice == "1":
network_tools_menu()
elif choice == "2":
cybersecurity_tools_menu()
elif choice == "3":
repo_download()
elif choice == "4":
print("Uscita dal programma. Arrivederci!")
break
else:
print(f"{Fore.RED}Opzione non valida. Per favore riprova.{Style.RESET_ALL}")
except KeyboardInterrupt:
print("\nProgramma interrotto dall'utente. Uscita...")
sys.exit()
def network_tools_menu():
while True:
print(f"\n{Fore.GREEN}Strumenti di Rete:{Style.RESET_ALL}")
print("1. Mostra Info IP e Rete Corrente")
print("2. Ping a un Host")
print("3. Traceroute")
print("4. DNS Lookup")
print("5. Visualizza Tabella ARP")
print("6. Torna al Menu Principale")
choice = input("Seleziona un'opzione (1-6): ")
if choice == "1":
show_network_info()
elif choice == "2":
ping_host()
elif choice == "3":
traceroute()
elif choice == "4":
dns_lookup()
elif choice == "5":
display_arp_table()
elif choice == "6":
break
else:
print(f"{Fore.RED}Opzione non valida. Per favore riprova.{Style.RESET_ALL}")
def cybersecurity_tools_menu():
while True:
print(f"\n{Fore.GREEN}Strumenti di Cybersecurity:{Style.RESET_ALL}")
print("1. Scansione con Nmap")
print("2. Scansione WP con WPScan")
print("3. Generazione parole con Cupp")
print("4. Crack password con Hashcat")
print("5. Brute Force con Hydra")
print("6. Sniffing con Airodump-ng")
print("7. MITM con Ettercap")
print("8. Phishing con setoolkit")
print("9. Torna al Menu Principale")
choice = input("Seleziona un'opzione (1-9): ")
if choice == "1":
nmap_scan()
elif choice == "2":
wpscan_scan()
elif choice == "3":
cupp_generate()
elif choice == "4":
hashcat_crack()
elif choice == "5":
hydra_bruteforce()
elif choice == "6":
airodump_ng_sniff()
elif choice == "7":
ettercap_mitm()
elif choice == "8":
phishing_setup()
elif choice == "9":
break
else:
print(f"{Fore.RED}Opzione non valida. Per favore riprova.{Style.RESET_ALL}")
def repo_download():
print(f"\n{Fore.YELLOW}--- Download Repo ---{Style.RESET_ALL}")
repo_url = input("Inserisci l'URL del repository Git da clonare: ")
repo_name = repo_url.split("/")[-1].replace(".git", "")
if os.path.exists(repo_name):
print(f"{Fore.RED}Il repository esiste già. Vuoi eliminarlo e riscaricarlo? (s/n){Style.RESET_ALL}")
choice = input()
if choice.lower() == "s":
subprocess.run(["rm", "-rf", repo_name])
subprocess.run(["git", "clone", repo_url])
print(f"{Fore.GREEN}Repository scaricato con successo!{Style.RESET_ALL}")
else:
print(f"{Fore.YELLOW}Download annullato.{Style.RESET_ALL}")
else:
subprocess.run(["git", "clone", repo_url])
print(f"{Fore.GREEN}Repository scaricato con successo!{Style.RESET_ALL}")
def nmap_scan():
target = input("Inserisci l'IP o il dominio da scansionare con Nmap: ")
print(f"\n{Fore.YELLOW}--- Eseguendo scansione Nmap su {target} ---{Style.RESET_ALL}")
subprocess.run(["nmap", target])
def wpscan_scan():
site = input("Inserisci l'URL del sito WordPress da scansionare: ")
print(f"\n{Fore.YELLOW}--- Eseguendo WPScan su {site} ---{Style.RESET_ALL}")
subprocess.run(["wpscan", "--url", site])
def cupp_generate():
print(f"\n{Fore.YELLOW}--- Generazione parole con Cupp ---{Style.RESET_ALL}")
subprocess.run(["cupp", "-i"])
def hashcat_crack():
hash_file = input("Inserisci il percorso del file hash: ")
wordlist = input("Inserisci il percorso della wordlist: ")
hash_type = input("Inserisci il tipo di hash (es. 0 per MD5): ")
print(f"\n{Fore.YELLOW}--- Crack password con Hashcat ---{Style.RESET_ALL}")
subprocess.run(["hashcat", "-m", hash_type, hash_file, wordlist])
def hydra_bruteforce():
target = input("Inserisci l'IP o il dominio target: ")
service = input("Inserisci il servizio (es. ssh): ")
username = input("Inserisci il nome utente: ")
wordlist = input("Inserisci il percorso della wordlist: ")
print(f"\n{Fore.YELLOW}--- Tentativo di brute force su {service} con Hydra ---{Style.RESET_ALL}")
subprocess.run(["hydra", "-l", username, "-P", wordlist, target, service])
def airodump_ng_sniff():
interface = input("Inserisci l'interfaccia Wi-Fi (es. wlan0): ")
print(f"\n{Fore.YELLOW}--- Sniffing della rete con Airodump-ng ---{Style.RESET_ALL}")
subprocess.run(["airodump-ng", interface])
def ettercap_mitm():
interface = input("Inserisci l'interfaccia per il MITM (es. eth0): ")
print(f"\n{Fore.YELLOW}--- Eseguendo attacco MITM con Ettercap ---{Style.RESET_ALL}")
subprocess.run(["ettercap", "-T", "-i", interface, "-M", "arp:remote"])
def phishing_setup():
print(f"\n{Fore.YELLOW}--- Configurazione Phishing con setoolkit ---{Style.RESET_ALL}")
subprocess.run(["setoolkit"])
# Funzioni di rete
def show_network_info():
print(f"\n{Fore.YELLOW}--- Informazioni di Rete ---{Style.RESET_ALL}")
try:
hostname = socket.gethostname()
local_ip = socket.gethostbyname(hostname)
print(f"Hostname: {hostname}")
print(f"Indirizzo IP Locale: {local_ip}")
except Exception as e:
print(f"Errore: {e}")
def ping_host():
host = input("Inserisci l'IP o il nome host da pingare: ")
subprocess.run(["ping", host])
def traceroute():
host = input("Inserisci l'IP o il nome host per traceroute: ")
subprocess.run(["traceroute", host])
def dns_lookup():
domain = input("Inserisci il nome di dominio da cercare: ")
result = socket.gethostbyname(domain)
print(f"Indirizzo IP di {domain} è {result}")
def display_arp_table():
subprocess.run(["arp", "-a"])
if __name__ == "__main__":
print_banner()
main_menu()