├── README.md
├── img
├── 123.JPG
├── 1234.JPG
└── HackGuard.png
├── main.py
├── requirements.txt
├── spring
├── tool_1.py
├── tool_10.py
├── tool_2.py
├── tool_4.py
├── tool_5.py
├── tool_6.py
└── tool_9.py
└── start.bat
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
⭐ HackGuard 1.0 (SOON)!⭐
5 |
6 |
7 | 📜・Description:
8 |
9 | HackGuard est une boîte à outils polyvalente et puissante, conçue pour améliorer votre productivité en développement, gestion de projets, et sécurité informatique. Développée par potopilo, cette suite d'outils vous offre 40 fonctionnalités différentes pour simplifier vos tâches quotidiennes. Que vous soyez développeur, administrateur système ou un passionné de technologie, HackGuard est votre allié incontournable.
10 |
11 |
12 |
13 |
14 |
15 | ⭐・Features:
16 |
17 |
18 |
HackGuard vous offre une large gamme de fonctionnalités réparties en différentes catégories :
19 |
20 |
21 |
22 | ### ⚙️ Fonctions principales :
23 |
24 | #### 🗂️ File and System Tools
25 | - File-Hash-Checker
26 | - Network-Traffic-Monitor
27 | - Wi-Fi-Scanner
28 | - Port-Knocking-Tool
29 | - DNS-Lookup-Tool
30 | - SSL-Certificate-Checker
31 | - Malware-Scanner
32 | - Social-Media-Scraper
33 | - Geolocation-Tool
34 | - System-Resource-Monitor
35 |
36 | #### 🕵️♂️ Network and Security Tools
37 | - Network-Speed-Test
38 | - IP-Geolocation-API
39 | - Vulnerability-Scanner
40 | - Packet-Sniffer
41 | - Firewall-Configuration-Tool
42 | - Log-Analyzer
43 | - Phishing-Detection-Tool
44 | - Browser-Fingerprinting-Tool
45 | - Credential-Stuffing-Tool
46 | - API-Testing-Tool
47 |
48 | #### 🔎 Data and Recovery Tools
49 | - Data-Breach-Checker
50 | - File-Integrity-Checker
51 | - RAT-Simulator
52 | - WAF-Tester
53 | - Cryptography-Tool
54 | - CLI-Tool
55 | - Data-Recovery-Tool
56 | - Backup-Tool
57 | - System-Information-Tool
58 | - User-Account-Management-Tool
59 |
60 | #### 🗺️ Mapping and Intelligence Tools
61 | - Network-Mapping-Tool
62 | - Incident-Response-Tool
63 | - Threat-Intelligence-Tool
64 | - Web-Scraper
65 | - Digital-Forensics-Tool
66 | - Privacy-Checker
67 | - Email-Spoofing-Tester
68 | - Data-Encryption-Tool
69 | - Network-Configuration-Tool
70 | - User-Activity-Monitor
71 |
72 |
73 | ・Nouveautés :
74 |
75 | ```
76 | -Amélioration de la traduction : Perfectionnement de la traduction et personnalisation du Tool.
77 | -Corrections de tout les bug, et re fonte du menu.
78 | ```
79 |
80 | ⏳・Installation:
81 |
82 | Téléchargez "HackGuard" ICI
83 |
84 |
85 |
86 | Or
87 | ```
88 | 1 - Ouvrez un terminal.
89 | 2 - Écrivez git clone https://github.com/HackGuard-projets/HackGuard.git.
90 | 3 - Écrivez "cd HackGuard".
91 | 4 - Écrivez "python main.py".
92 |
93 | (Les modules sont a installer manuelement).
94 | ```
95 |
96 |
97 | ⚠️・Conditions d'utilisation :
98 |
99 |
100 | HackGuard a été développé uniquement à des fins éducatives.
101 | Ne pas utiliser a des fin criminelles ou malveillante !
102 |
103 |
104 |
105 | 🔗・Credits:
106 |
107 |
108 | - Discord
109 | - Createur: Potopilo
110 | - Version: 1.0
111 |
112 |
--------------------------------------------------------------------------------
/img/123.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HackGuard-projets/HackGuard/3dc5525ef11b5effc840d5e4e57caefaa6404662/img/123.JPG
--------------------------------------------------------------------------------
/img/1234.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HackGuard-projets/HackGuard/3dc5525ef11b5effc840d5e4e57caefaa6404662/img/1234.JPG
--------------------------------------------------------------------------------
/img/HackGuard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HackGuard-projets/HackGuard/3dc5525ef11b5effc840d5e4e57caefaa6404662/img/HackGuard.png
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | import subprocess
2 | import os
3 | import fade
4 | from colorama import Fore, Style, init
5 |
6 | init(autoreset=True)
7 |
8 | def clear_console():
9 | os.system('cls' if os.name == 'nt' else 'clear')
10 |
11 | def display_main_menu():
12 | clear_console()
13 | ascii_art = """
14 | _ _ _ _____ _
15 | | | | | | | / ____| | |
16 | | |__| | __ _ ___| | _| | __ _ _ __ _ _ __ __| |
17 | | __ |/ _` |/ __| |/ / | |_ | | | |/ _` | '__/ _` |
18 | | | | | (_| | (__| <| |__| | |_| | (_| | | | (_| |
19 | |_| |_|\__,_|\___|_|\_\\______|\__,_|\__,_|_| \__,_| (By potopilo)
20 |
21 | ┌─────────────────────────────── File and System Tools ───────────────────────────────┐
22 | │ [1] File Hash Checker [2] Network Traffic Monitor │
23 | │ [3] Wi-Fi Scanner [4] Port Knocking Tool │
24 | │ [5] DNS Lookup Tool [6] SSL Certificate Checker │
25 | │ [7] Malware Scanner [8] Social Media Scraper │
26 | │ [9] Geolocation Tool [10] System Resource Monitor │
27 | └─────────────────────────────────────────────────────────────────────────────────────┘
28 |
29 | ┌─────────────────────────────── Network and Security Tools ──────────────────────────┐
30 | │ [11] Network Speed Test [12] IP Geolocation API │
31 | │ [13] Vulnerability Scanner [14] Packet Sniffer │
32 | │ [15] Firewall Configuration Tool [16] Log Analyzer │
33 | │ [17] Phishing Detection Tool [18] Browser Fingerprinting Tool │
34 | │ [19] Credential Stuffing Tool [20] API Testing Tool │
35 | └─────────────────────────────────────────────────────────────────────────────────────┘
36 | ┌─────────────────────────────────────────────────────────────────────────────────────┐
37 | │ Press (B) to go Back Press (N) for Next │
38 | └─────────────────────────────────────────────────────────────────────────────────────┘
39 | """
40 | clear_console()
41 | print(fade.purplepink(ascii_art))
42 |
43 | def display_next_menu():
44 | clear_console()
45 | menu2()
46 |
47 |
48 | def menu2():
49 | clear_console()
50 | ascii_art2 = """
51 | _ _ _ _____ _
52 | | | | | | | / ____| | |
53 | | |__| | __ _ ___| | _| | __ _ _ __ _ _ __ __| |
54 | | __ |/ _` |/ __| |/ / | |_ | | | |/ _` | '__/ _` |
55 | | | | | (_| | (__| <| |__| | |_| | (_| | | | (_| |
56 | |_| |_|\__,_|\___|_|\_\\______|\__,_|\__,_|_| \__,_| (By potopilo)
57 |
58 | ┌─────────────────────────────── Data and Recovery Tools ─────────────────────────────┐
59 | │ [21] Data Breach Checker [22] File Integrity Checker │
60 | │ [23] RAT Simulator [24] WAF Tester │
61 | │ [25] Cryptography Tool [26] CLI Tool │
62 | │ [27] Data Recovery Tool [28] Backup Tool │
63 | │ [29] System Information Tool [30] User Account Management Tool │
64 | └─────────────────────────────────────────────────────────────────────────────────────┘
65 |
66 | ┌─────────────────────────────── Mapping and Intelligence Tools ──────────────────────┐
67 | │ [31] Network Mapping Tool [32] Incident Response Tool │
68 | │ [33] Threat Intelligence Tool [34] Web Scraper │
69 | │ [35] Digital Forensics Tool [36] Privacy Checker │
70 | │ [37] Email Spoofing Tester [38] Data Encryption Tool │
71 | │ [39] Network Configuration Tool [40] User Activity Monitor │
72 | └─────────────────────────────────────────────────────────────────────────────────────┘
73 |
74 | ┌─────────────────────────────────────────────────────────────────────────────────────┐
75 | │ Press (B) to go Back Press (N) for Next │
76 | └─────────────────────────────────────────────────────────────────────────────────────┘"""
77 | print(fade.purplepink(ascii_art2))
78 |
79 |
80 |
81 | def main():
82 | current_menu = 'main'
83 | current_menu2 = 'main2'
84 | while True:
85 | if current_menu == 'main':
86 | display_main_menu()
87 | choice = input(Fore.LIGHTMAGENTA_EX+"Choose an option (1-20) : ")
88 |
89 | if choice == 'N' or choice.lower() == 'n':
90 | menu2()
91 | elif choice == 'B' or choice.lower() == 'b':
92 | display_main_menu()
93 | elif choice == '0':
94 | print(Fore.RED + "Goodbye!")
95 | break
96 | elif choice in [str(i) for i in range(1, 30)]:
97 | subprocess.run(["python", os.path.join(os.path.dirname(__file__), "spring", f"tool_{choice}.py")])
98 | else:
99 | print(Fore.GREEN + "Invalid choice. Please enter a number between 1 and 40.")
100 |
101 | if current_menu == 'main2':
102 | menu2()
103 | choice = input(Fore.LIGHTMAGENTA_EX+"Choose an option (21-40) : ")
104 |
105 | if choice == 'N' or choice.lower() == 'n':
106 | clear_console()
107 | input("No next menu.")
108 | elif choice == 'B' or choice.lower() == 'b':
109 | display_main_menu()
110 | elif choice == '0':
111 | print(Fore.RED + "Goodbye!")
112 | break
113 | elif choice in [str(i) for i in range(1, 30)]:
114 | subprocess.run(["python", os.path.join(os.path.dirname(__file__), "spring", f"tool_{choice}.py")])
115 | else:
116 | print(Fore.GREEN + "Invalid choice. Please enter a number between 1 and 40.")
117 |
118 |
119 | elif current_menu == 'next':
120 | menu2()
121 |
122 | if choice == 'B' or choice.lower() == 'b':
123 | current_menu = 'main'
124 | elif choice == '0':
125 | current_menu = 'main'
126 | elif choice in [str(i) for i in range(22, 30)]:
127 | subprocess.run(["python", os.path.join(os.path.dirname(__file__), "spring", f"tool_{choice}.py")])
128 | else:
129 | print(Fore.GREEN + "Invalid choice. Please enter a number between 22 and 29.")
130 |
131 |
132 |
133 |
134 |
135 | if __name__ == "__main__":
136 | main()
137 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | colorama
2 | hashlib
3 | psutil
4 | socket
5 | snscrape
6 | requests
7 | folium
8 | prettytable
9 | tqdm
10 |
--------------------------------------------------------------------------------
/spring/tool_1.py:
--------------------------------------------------------------------------------
1 | import hashlib
2 | from colorama import init, Fore, Style
3 | import os
4 |
5 | init(autoreset=True)
6 |
7 | def clear_console():
8 | os.system('cls' if os.name == 'nt' else 'clear')
9 |
10 | def calculate_file_hash(file_path, hash_algorithm='sha256'):
11 | hash_func = hashlib.new(hash_algorithm)
12 |
13 | try:
14 | with open(file_path, 'rb') as f:
15 | for chunk in iter(lambda: f.read(4096), b""):
16 | hash_func.update(chunk)
17 | except FileNotFoundError:
18 | print(Fore.RED + f"Error: The file '{file_path}' was not found.")
19 | return None
20 | except Exception as e:
21 | print(Fore.RED + f"Error reading the file: {e}")
22 | return None
23 |
24 | return hash_func.hexdigest()
25 |
26 | def main():
27 | clear_console()
28 | print(Fore.BLUE + Style.BRIGHT + "=== File Hash Checker ===")
29 |
30 |
31 | file_path = input(Fore.BLUE + "Enter the path of the file to check: ")
32 | expected_hash = input(Fore.BLUE + "Enter the expected hash: ")
33 |
34 | calculated_hash = calculate_file_hash(file_path)
35 |
36 | if calculated_hash is not None:
37 | print(Fore.BLUE + "Calculated hash: " + Fore.GREEN + calculated_hash)
38 | print(Fore.BLUE + "Expected hash: " + Fore.GREEN + expected_hash)
39 |
40 | if calculated_hash == expected_hash:
41 | print(Fore.GREEN + "The file is intact.")
42 | else:
43 | print(Fore.RED + "The file has been modified or is corrupted.")
44 |
45 | input(Fore.BLUE + "Press Enter to exit...")
46 |
47 | if __name__ == "__main__":
48 | main()
49 |
--------------------------------------------------------------------------------
/spring/tool_10.py:
--------------------------------------------------------------------------------
1 | import psutil
2 | import os
3 | import time
4 | from colorama import init, Fore, Style
5 |
6 | init(autoreset=True)
7 |
8 | def clear_console():
9 | os.system('cls' if os.name == 'nt' else 'clear')
10 |
11 | def display_system_info():
12 | clear_console()
13 | print(Fore.BLUE + Style.BRIGHT + "=== System Resource Monitor ===")
14 |
15 | cpu_usage = psutil.cpu_percent(interval=1)
16 | print(Fore.GREEN + "CPU Usage: " + Fore.YELLOW + f"{cpu_usage}%")
17 |
18 | memory = psutil.virtual_memory()
19 | print(Fore.GREEN + "Memory Usage: " + Fore.YELLOW + f"{memory.percent}% ({memory.used / (1024 ** 2):.2f} MB used / {memory.total / (1024 ** 2):.2f} MB total)")
20 |
21 | disk = psutil.disk_usage('/')
22 | print(Fore.GREEN + "Disk Usage: " + Fore.YELLOW + f"{disk.percent}% ({disk.used / (1024 ** 3):.2f} GB used / {disk.total / (1024 ** 3):.2f} GB total)")
23 |
24 | net_io = psutil.net_io_counters()
25 | print(Fore.GREEN + "Network Usage: " + Fore.YELLOW + f"Sent: {net_io.bytes_sent / (1024 ** 2):.2f} MB, Received: {net_io.bytes_recv / (1024 ** 2):.2f} MB")
26 |
27 | def main():
28 | try:
29 | while True:
30 | display_system_info()
31 | time.sleep(2)
32 | except KeyboardInterrupt:
33 | print(Fore.RED + "\nExiting System Resource Monitor...")
34 | print(Fore.YELLOW + "\n" + "="*30)
35 | print(Fore.YELLOW + "Press Enter to exit the program...")
36 | input()
37 |
38 | if __name__ == "__main__":
39 | main()
40 |
--------------------------------------------------------------------------------
/spring/tool_2.py:
--------------------------------------------------------------------------------
1 | import psutil
2 | from colorama import init, Fore, Style
3 | import os
4 | import time
5 | import socket
6 | import threading
7 |
8 | init(autoreset=True)
9 |
10 | exit_program = False
11 |
12 | def clear_console():
13 | os.system('cls' if os.name == 'nt' else 'clear')
14 |
15 | def get_network_info():
16 | net_info = psutil.net_if_addrs()
17 | net_io = psutil.net_io_counters(pernic=True)
18 | return net_info, net_io
19 |
20 | def print_table(interface, addr, stats):
21 | print(Fore.BLUE + Style.BRIGHT + "+" + "-"*85 + "+")
22 | print(Fore.BLUE + "| {:<40} | {:<40} |".format(f"Interface: {interface}", f"IP Address: {addr}"))
23 | print(Fore.BLUE + "| {:<40} | {:<40} |".format("Bytes Sent: " + str(stats.bytes_sent), "Bytes Received: " + str(stats.bytes_recv)))
24 | print(Fore.BLUE + "| {:<40} | {:<40} |".format("Packets Sent: " + str(stats.packets_sent), "Packets Received: " + str(stats.packets_recv)))
25 | print(Fore.BLUE + "| {:<40} | {:<40} |".format("Errors Sent: " + str(stats.errout), "Errors Received: " + str(stats.errin)))
26 | print(Fore.BLUE + "+" + "-"*85 + "+")
27 |
28 | def wait_for_exit():
29 | global exit_program
30 | input(Fore.BLUE + "Press Enter to exit at any time...")
31 | exit_program = True
32 |
33 | def main():
34 | global exit_program
35 | clear_console()
36 | print(Fore.BLUE + Style.BRIGHT + "=== Network Traffic Monitor ===")
37 | print(Fore.YELLOW + "Press Enter to exit at any time...\n")
38 |
39 | exit_thread = threading.Thread(target=wait_for_exit)
40 | exit_thread.start()
41 |
42 | try:
43 | while not exit_program:
44 | clear_console()
45 | print(Fore.BLUE + Style.BRIGHT + "=== Network Traffic Monitor ===")
46 | print(Fore.YELLOW + "Press Enter to exit at any time...\n")
47 | net_info, net_io = get_network_info()
48 | for interface, addresses in net_info.items():
49 | stats = net_io.get(interface)
50 | if stats:
51 | for addr in addresses:
52 | if addr.family == socket.AF_INET:
53 | print_table(interface, addr.address, stats)
54 | time.sleep(1)
55 | except KeyboardInterrupt:
56 | exit_program = True
57 | finally:
58 | print(Fore.BLUE + "Exiting the Network Traffic Monitor...")
59 | exit_thread.join()
60 | input(Fore.BLUE + "Press Enter to exit...")
61 |
62 | if __name__ == "__main__":
63 | main()
64 |
--------------------------------------------------------------------------------
/spring/tool_4.py:
--------------------------------------------------------------------------------
1 | import socket
2 | import os
3 | import time
4 | import threading
5 | from colorama import init, Fore, Style
6 |
7 | init(autoreset=True)
8 |
9 | exit_program = False
10 |
11 | def clear_console():
12 | os.system('cls' if os.name == 'nt' else 'clear')
13 |
14 | def wait_for_exit():
15 | global exit_program
16 | input(Fore.BLUE + "Press Enter to exit at any time...")
17 | exit_program = True
18 |
19 | class PortKnocker:
20 | def __init__(self, host, ports, delay):
21 | self.host = host
22 | self.ports = ports
23 | self.delay = delay
24 |
25 | def knock(self):
26 | for port in self.ports:
27 | print(Fore.GREEN + f"Knocking on port {port}...")
28 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
29 | sock.settimeout(1)
30 | try:
31 | result = sock.connect_ex((self.host, port))
32 | if result == 0:
33 | print(Fore.GREEN + f"Successfully knocked on port {port}.")
34 | else:
35 | print(Fore.RED + f"Failed to knock on port {port}.")
36 | except Exception as e:
37 | print(Fore.RED + f"Error knocking on port {port}: {e}")
38 | time.sleep(self.delay)
39 | def main():
40 | global exit_program
41 | clear_console()
42 | print(Fore.BLUE + Style.BRIGHT + "=== Port Knocking Tool ===")
43 | print(Fore.YELLOW + "Press Enter to exit at any time...\n")
44 |
45 |
46 | host = input(Fore.YELLOW + "Enter the target host (IP or hostname): ")
47 | ports = input(Fore.YELLOW + "Enter the ports to knock (space-separated): ")
48 | ports = list(map(int, ports.split()))
49 | delay = float(input(Fore.YELLOW + "Enter the delay between knocks (in seconds): "))
50 |
51 |
52 | exit_thread = threading.Thread(target=wait_for_exit)
53 | exit_thread.start()
54 |
55 |
56 | knocker = PortKnocker(host, ports, delay)
57 |
58 | try:
59 | while not exit_program:
60 | knocker.knock()
61 | print(Fore.BLUE + "Knocking sequence completed.")
62 | break
63 | except KeyboardInterrupt:
64 | exit_program = True
65 | finally:
66 | print(Fore.BLUE + "Exiting the Port Knocking Tool...")
67 | exit_thread.join()
68 | input(Fore.BLUE + "Press Enter to exit...")
69 |
70 | if __name__ == "__main__":
71 | main()
72 |
--------------------------------------------------------------------------------
/spring/tool_5.py:
--------------------------------------------------------------------------------
1 | import socket
2 | import os
3 | import time
4 | import threading
5 | from colorama import init, Fore, Style
6 |
7 | init(autoreset=True)
8 |
9 | exit_program = False
10 |
11 | def clear_console():
12 | os.system('cls' if os.name == 'nt' else 'clear')
13 |
14 | def wait_for_exit():
15 | global exit_program
16 | input(Fore.BLUE + "Press Enter to exit at any time...")
17 | exit_program = True
18 |
19 | class PortKnocker:
20 | def __init__(self, host, ports, delay):
21 | self.host = host
22 | self.ports = ports
23 | self.delay = delay
24 |
25 | def knock(self):
26 | for port in self.ports:
27 | print(Fore.GREEN + f"Knocking on port {port}...")
28 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
29 | sock.settimeout(1)
30 | try:
31 | result = sock.connect_ex((self.host, port))
32 | if result == 0:
33 | print(Fore.GREEN + f"Successfully knocked on port {port}.")
34 | else:
35 | print(Fore.RED + f"Failed to knock on port {port}.")
36 | except Exception as e:
37 | print(Fore.RED + f"Error knocking on port {port}: {e}")
38 | time.sleep(self.delay)
39 | def main():
40 | global exit_program
41 | clear_console()
42 | print(Fore.BLUE + Style.BRIGHT + "=== Port Knocking Tool ===")
43 | print(Fore.YELLOW + "Press Enter to exit at any time...\n")
44 |
45 |
46 | host = input(Fore.YELLOW + "Enter the target host (IP or hostname): ")
47 | ports = input(Fore.YELLOW + "Enter the ports to knock (space-separated): ")
48 | ports = list(map(int, ports.split()))
49 | delay = float(input(Fore.YELLOW + "Enter the delay between knocks (in seconds): "))
50 |
51 |
52 | exit_thread = threading.Thread(target=wait_for_exit)
53 | exit_thread.start()
54 |
55 |
56 | knocker = PortKnocker(host, ports, delay)
57 |
58 | try:
59 | while not exit_program:
60 | knocker.knock()
61 | print(Fore.BLUE + "Knocking sequence completed.")
62 | break
63 | except KeyboardInterrupt:
64 | exit_program = True
65 | finally:
66 | print(Fore.BLUE + "Exiting the Port Knocking Tool...")
67 | exit_thread.join()
68 | input(Fore.BLUE + "Press Enter to exit...")
69 |
70 | if __name__ == "__main__":
71 | main()
72 |
--------------------------------------------------------------------------------
/spring/tool_6.py:
--------------------------------------------------------------------------------
1 | import socket
2 | import ssl
3 | import os
4 | import time
5 | import threading
6 | from colorama import init, Fore, Style
7 |
8 | init(autoreset=True)
9 |
10 | exit_program = False
11 |
12 | def clear_console():
13 | os.system('cls' if os.name == 'nt' else 'clear')
14 |
15 | def wait_for_exit():
16 | global exit_program
17 | input(Fore.BLUE + "Press Enter to exit at any time...")
18 | exit_program = True
19 |
20 | class SSLCertificateChecker:
21 | def __init__(self, domain):
22 | self.domain = domain
23 |
24 | def check_certificate(self):
25 | try:
26 | context = ssl.create_default_context()
27 | with socket.create_connection((self.domain, 443)) as sock:
28 | with context.wrap_socket(sock, server_hostname=self.domain) as ssock:
29 | cert = ssock.getpeercert()
30 | print(Fore.GREEN + f"Certificate for {self.domain}:")
31 | print(Fore.YELLOW + f" Subject: {cert['subject']}")
32 | print(Fore.YELLOW + f" Issuer: {cert['issuer']}")
33 | print(Fore.YELLOW + f" Valid from: {cert['notBefore']}")
34 | print(Fore.YELLOW + f" Valid until: {cert['notAfter']}")
35 | except ssl.SSLError as e:
36 | print(Fore.RED + f"SSL error: {e}")
37 | except Exception as e:
38 | print(Fore.RED + f"An error occurred: {e}")
39 |
40 | def main():
41 | global exit_program
42 | clear_console()
43 | print(Fore.BLUE + Style.BRIGHT + "=== SSL Certificate Checker ===")
44 | print(Fore.YELLOW + "Press Enter to exit at any time...\n")
45 |
46 | domain = input(Fore.YELLOW + "Enter the domain to check (e.g., example.com): ")
47 |
48 | exit_thread = threading.Thread(target=wait_for_exit)
49 | exit_thread.start()
50 |
51 | checker = SSLCertificateChecker(domain)
52 |
53 | try:
54 | while not exit_program:
55 | checker.check_certificate()
56 | print(Fore.BLUE + "SSL Certificate check completed.")
57 | break
58 | except KeyboardInterrupt:
59 | exit_program = True
60 | finally:
61 | print(Fore.BLUE + "Exiting the SSL Certificate Checker...")
62 | exit_thread.join()
63 | input(Fore.BLUE + "Press Enter to exit...")
64 |
65 | if __name__ == "__main__":
66 | main()
67 |
--------------------------------------------------------------------------------
/spring/tool_9.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import folium
3 | from colorama import init, Fore, Style
4 | import os
5 | from prettytable import PrettyTable
6 |
7 | init(autoreset=True)
8 |
9 | def clear_console():
10 | os.system('cls' if os.name == 'nt' else 'clear')
11 |
12 | def get_location_ipinfo(ip_address):
13 | try:
14 | response = requests.get(f"https://ipinfo.io/{ip_address}/json")
15 | ip_info = response.json()
16 | lat, long = ip_info.get('loc', '0,0').split(',')
17 | return float(lat), float(long), ip_info
18 | except Exception as e:
19 | print(Fore.RED + f"Error retrieving data: {e}")
20 | return None, None, {}
21 |
22 | def get_location_ipapi(ip_address):
23 | return None, None, {}
24 |
25 | def create_map(lat, long, ip_info):
26 | user_map = folium.Map(location=[lat, long], zoom_start=12)
27 | folium.Marker([lat, long], popup=f"IP: {ip_info['ip']}\nCity: {ip_info.get('city', 'N/A')}\nRegion: {ip_info.get('region', 'N/A')}\nCountry: {ip_info.get('country', 'N/A')}").add_to(user_map)
28 | return user_map
29 |
30 | def display_data(ip_info):
31 | table = PrettyTable()
32 | table.field_names = ["Field", "Value"]
33 |
34 | table.add_row(["IP", ip_info.get('ip', 'N/A')])
35 | table.add_row(["City", ip_info.get('city', 'N/A')])
36 | table.add_row(["Region", ip_info.get('region', 'N/A')])
37 | table.add_row(["Country", ip_info.get('country', 'N/A')])
38 | table.add_row(["Latitude", ip_info.get('loc', 'N/A').split(',')[0] if 'loc' in ip_info else 'N/A'])
39 | table.add_row(["Longitude", ip_info.get('loc', 'N/A').split(',')[1] if 'loc' in ip_info else 'N/A'])
40 |
41 | print(Fore.GREEN + str(table))
42 |
43 | def main():
44 | clear_console()
45 | print(Fore.BLUE + Style.BRIGHT + "=== Geolocation-Tool ===")
46 | ip_address = input(Fore.BLUE + "Enter the IP address to locate: ")
47 |
48 | lat, long, ip_info = get_location_ipinfo(ip_address)
49 |
50 | if lat is None or long is None:
51 | lat, long, ip_info = get_location_ipapi(ip_address)
52 |
53 | if lat is not None and long is not None:
54 | print(Fore.GREEN + f"Latitude: {lat}, Longitude: {long}")
55 | display_data(ip_info)
56 | user_map = create_map(lat, long, ip_info)
57 | user_map.save("ip_location_map.html")
58 | print(Fore.GREEN + "Map has been created and saved as 'ip_location_map.html'.")
59 | input(Fore.BLUE + "Press Enter to exit...")
60 | else:
61 | print(Fore.RED + "Failed to retrieve location for the given IP address.")
62 | input(Fore.BLUE + "Press Enter to exit...")
63 |
64 | if __name__ == "__main__":
65 | main()
66 |
--------------------------------------------------------------------------------
/start.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | pip install -r requirements.txt > nul 2>&1
4 |
5 | set /p answer=Do you want to continue (Y/N)?
6 |
7 | if /i "%answer%"=="Y" (
8 | python main.py
9 | if errorlevel 1 (
10 | py main.py
11 | )
12 | )
13 |
14 | timeout /t 5 /nobreak
15 |
--------------------------------------------------------------------------------