Skip to content

Commit fc6013c

Browse files
committed
version 0.3
-Lot of changes to formatting -renamed local_accounts_getter to local_user_enum and remade it -renamed wifi_password_getter to wifi_vault and remade it -improved dirbuster -improved wi-fi scanner -and more...
1 parent 64b875f commit fc6013c

26 files changed

+422
-395
lines changed

h4xtools.py

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -18,93 +18,95 @@
1818
"""
1919

2020
import os, time, socket
21-
from colorama import Fore
21+
from colorama import Fore, Style
2222
from helper import printer, handles
2323

24-
25-
if os.name == "nt":
26-
os.system("cls")
27-
os.system("title H4X-Tools")
28-
if os.name == "posix":
29-
os.system("clear")
30-
31-
VERSION = "0.2.16"
32-
24+
VERSION = "0.3"
3325

3426
def internet_check() -> None:
35-
"""
36-
Checks if the internet connection is available.
37-
38-
:return: None
39-
"""
4027
try:
4128
socket.create_connection(("gnu.org", 80))
4229
printer.success("Internet Connection is Available..!")
4330
except OSError:
4431
printer.warning("Internet Connection is Unavailable..!")
4532

46-
4733
def print_banner() -> None:
48-
"""
49-
Prints the banner of H4X-Tools.
50-
"""
5134
print(Fore.LIGHTBLACK_EX + f"""
5235
▄ .▄▐▄• ▄ ▄▄▄▄▄ ▄▄▌ .▄▄ ·
5336
██▪▐█ █▌█▌▪•██ ▪ ▪ ██• ▐█ ▀.
5437
██▀▐█ ·██· ▐█.▪ ▄█▀▄ ▄█▀▄ ██▪ ▄▀▀▀█▄
5538
██▌▐▀▪▐█·█▌ ▐█▌·▐█▌.▐▌▐█▌.▐▌▐█▌▐▌▐█▄▪▐█
5639
▀▀▀ ·•▀▀ ▀▀ ▀▀▀ ▀█▄▀▪ ▀█▄▀▪.▀▀▀ ▀▀▀▀
57-
v{VERSION} / Vili (@vil) / https://vili.dev
40+
{Style.RESET_ALL}v{VERSION} / Vili (@vil) / https://vili.dev
5841
""")
5942

60-
6143
def about() -> None:
62-
"""
63-
Prints the about text.
64-
"""
65-
print(Fore.GREEN)
44+
print(Fore.LIGHTCYAN_EX)
6645
printer.nonprefix(f"""
67-
H4X-Tools, toolkit for scraping, OSINT and more.
68-
Completely open source and free to use! Feel free to contribute.
69-
Repo: https://github.com/vil/h4x-tools
70-
NOTE! THIS TOOL IS ONLY FOR EDUCATIONAL PURPOSES, DON'T USE IT ILLEGALLY!
71-
Version: {VERSION}
46+
H4X-Tools v{VERSION}, a toolkit for scraping, OSINT and more.
47+
48+
Repository link : https://github.com/vil/h4x-tools
49+
50+
Made in Finland, with love.
51+
52+
53+
Name Desc
54+
--------- ----------
55+
Ig Scrape : Scrapes information from IG accounts.
56+
Web Search : Searches the internet for the given query.
57+
Phone Lookup : Looks up a phone number and returns information about it.
58+
Ip Lookup : Looks up an IP/domain address and returns information about it.
59+
Port Scanner : Scans for open ports in a given IP/domain address.
60+
Username Search : Tries to find a given username from many different websites.
61+
Email Search : Efficiently finds registered accounts from a given email.
62+
Webhook Spammer : Spams messages to a discord webhook.
63+
WhoIs Lookup : Looks up a domain and returns information about it.
64+
SMS Bomber : Spams messages to a given mobile number. (Works poorly and only for US numbers)
65+
Fake Info Generator : Generates fake information using Faker.
66+
Web Scrape : Scrapes links from a given url.
67+
Wi-Fi Finder : Scans for nearby Wi-Fi networks.
68+
Wi-Fi Vault : Scans for locally saved Wi-Fi passwords.
69+
Dir Buster : Bruteforce directories on a website.
70+
Local User Enum : Enumerates local user accounts on the current machine.
71+
Caesar Cipher : Cipher/decipher/bruteforce a message using the Caesar's code.
72+
BaseXX : Encodes/decodes a message using Base64/32/16.
73+
About : Tells you about the tool.
74+
Donate : My crypto addresses where to donate.
75+
Exit : Exits the tool.
76+
77+
This source code is under the GNU General Public License, version 3, and is made by Vili.
7278
""")
7379

7480

7581
def donate() -> None:
76-
"""
77-
Prints the donate text.
78-
"""
79-
printer.nonprefix(f"""{Fore.GREEN}
80-
If you want to support me and my work, you can donate to these addresses: \n
81-
| BCH: qp58pmwsfq4rp0vvafjrj2uenp8edmftycvvh8wmlg
82-
| BTC: bc1qwgeuvc25g4hrylmgcup4yzavt5tl8pk93auj34
83-
| ETH: 0x4433D6d7d31F38c63E0e6eA31Ffac2125B618142
84-
| XMR: 47RTtA7b8dgQmd9dDYYTUrhsrXzdUvckLGqvZoBCwrchRdky1fLmzexL3esTNrTMstJiafnhDacsXi8UnS1AXACNKkNzv71
85-
Or support me on GitHub: https://github.com/sponsors/vil
82+
printer.nonprefix(f"""{Fore.LIGHTCYAN_EX}
83+
If you want to support me and keep H4X-Tools alive, you can donate to these addresses:
84+
85+
Platform Address
86+
------ ------
87+
BCH : qp58pmwsfq4rp0vvafjrj2uenp8edmftycvvh8wmlg
88+
BTC : bc1qwgeuvc25g4hrylmgcup4yzavt5tl8pk93auj34
89+
ETH : 0x4433D6d7d31F38c63E0e6eA31Ffac2125B618142
90+
XMR : 47RTtA7b8dgQmd9dDYYTUrhsrXzdUvckLGqvZoBCwrchRdky1fLmzexL3esTNrTMstJiafnhDacsXi8UnS1AXACNKkNzv71
91+
Or you can support me on GitHub : https://github.com/sponsors/vil
8692
8793
Every single donation is appreciated! <3
8894
""")
8995

90-
9196
def print_menu() -> None:
92-
"""
93-
Prints the main menu of H4X-Tools.
94-
"""
9597
max_option_length = max(len(value.__name__.replace('handle_', '').replace('_', ' ').title()) for value in MENU_OPTIONS.values())
9698

9799
for i, (key, value) in enumerate(MENU_OPTIONS.items(), start=1):
98100
option_name = value.__name__.replace('handle_', '').replace('_', ' ').title()
99-
print(f"[{key}] {option_name.ljust(max_option_length)}", end='\t')
101+
print(f"{Fore.LIGHTGREEN_EX}[{key}]{Style.RESET_ALL} {option_name.ljust(max_option_length)}", end='')
100102

101-
# Break line every two options or at the end
102-
if i % 2 == 0 or i == len(MENU_OPTIONS):
103+
if i % 2 == 0:
103104
print()
105+
else:
106+
print(" " * 4, end='')
104107

105108
print("\n")
106109

107-
108110
MENU_OPTIONS = {
109111
"1": handles.handle_ig_scrape,
110112
"2": handles.handle_web_search,
@@ -119,21 +121,17 @@ def print_menu() -> None:
119121
"11": handles.handle_fake_info_generator,
120122
"12": handles.handle_web_scrape,
121123
"13": handles.handle_wifi_finder,
122-
"14": handles.handle_wifi_password_getter,
124+
"14": handles.handle_wifi_vault,
123125
"15": handles.handle_dir_buster,
124-
"16": handles.handle_local_accounts_getter,
126+
"16": handles.handle_local_user_enum,
125127
"17": handles.handle_caesar_cipher,
126128
"18": handles.handle_basexx,
127129
"19": about,
128130
"20": donate,
129131
"21": handles.handle_exit
130132
}
131133

132-
133134
def main() -> None:
134-
"""
135-
Main function.
136-
"""
137135
internet_check()
138136
time.sleep(0.5)
139137

@@ -145,9 +143,8 @@ def main() -> None:
145143
print_banner()
146144
time.sleep(1)
147145
print_menu()
148-
user_input = input("[$] Select your option ~> \t")
146+
user_input = printer.inp(f"Tool to execute : ")
149147

150-
# Check if the user wants to exit
151148
if user_input.lower() in {"quit", "exit", "q", "kill", "21"}:
152149
handles.handle_exit()
153150
break
@@ -159,6 +156,5 @@ def main() -> None:
159156
printer.error("Invalid option!")
160157
time.sleep(0.5)
161158

162-
163159
if __name__ == "__main__":
164160
main()

helper/handles.py

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from utils import (
1919
email_search,
20+
local_user_enum,
2021
search_username,
2122
ig_scrape,
2223
whois_lookup,
@@ -28,27 +29,24 @@
2829
smsbomber,
2930
web_scrape,
3031
wifi_finder,
31-
wifi_password_getter,
3232
fake_info_generator,
3333
dirbuster,
34-
local_accounts_getter,
3534
caesar_cipher,
36-
basexx
35+
basexx,
36+
wifi_vault
3737
)
3838
from helper import printer
39-
import time, os, json, base64
40-
from colorama import Fore
41-
from getpass import getpass
39+
import time, os
40+
from colorama import Style
4241

4342

4443
def handle_exit() -> None:
4544
"""
4645
Kills the program.
4746
"""
48-
printer.warning("Exiting...")
49-
printer.info("Thanks for using H4X-Tools! Remember to star this on GitHub!\n -Vili")
47+
printer.warning("Goodbye...")
5048
time.sleep(0.5)
51-
print(Fore.RESET)
49+
print(Style.RESET_ALL)
5250

5351

5452
def handle_ig_scrape() -> None:
@@ -57,7 +55,7 @@ def handle_ig_scrape() -> None:
5755
5856
Note, you have to log in to Instagram in order to use this util.
5957
"""
60-
target = str(input("Enter a target username : \t")).replace(" ", "_")
58+
target = str(printer.inp("Enter a target username : \t")).replace(" ", "_")
6159
ig_scrape.Scrape(target)
6260
time.sleep(1)
6361

@@ -67,31 +65,31 @@ def handle_web_search() -> None:
6765
Handles the Web Search util.
6866
"""
6967
printer.info("For advanced searching, you can use DuckDuckGo's advanced syntaxing. Please refer to this guide: \nhttps://duckduckgo.com/duckduckgo-help-pages/results/syntax/")
70-
query = str(input("Search query : \t"))
68+
query = str(printer.inp("Search query : \t"))
7169
websearch.Search(query)
7270

7371

7472
def handle_phone_lookup() -> None:
7573
"""
7674
Handles the Phone number Lookup util.
7775
"""
78-
no = str(input("Enter a phone-number with country code : \t"))
76+
no = str(printer.inp("Enter a phone-number with country code : \t"))
7977
phonenumber_lookup.LookUp(no)
8078

8179

8280
def handle_ip_lookup() -> None:
8381
"""
8482
Handles the IP/Domain Lookup util.
8583
"""
86-
ip = str(input("Enter a IP address OR domain : \t"))
84+
ip = str(printer.inp("Enter a IP address OR domain : \t"))
8785
ip_lookup.Lookup(ip)
8886

8987

9088
def handle_username_search() -> None:
9189
"""
9290
Handles the Username Search util.
9391
"""
94-
username = str(input("Enter a Username : \t")).replace(" ", "_")
92+
username = str(printer.inp("Enter a Username : \t")).replace(" ", "_")
9593
search_username.Search(username)
9694

9795

@@ -104,36 +102,36 @@ def handle_email_search() -> None:
104102
if os.name == "nt":
105103
printer.warning(f"Sorry, this currently only works on Linux machines :(")
106104
else:
107-
email = str(input("Enter a email address : \t"))
105+
email = str(printer.inp("Enter a email address : \t"))
108106
email_search.Holehe(email)
109107

110108

111109
def handle_port_scanner() -> None:
112110
"""
113111
Handles the Port Scanner util.
114112
"""
115-
ip = str(input("Enter a IP address OR domain : \t"))
116-
port_range = int(input("Enter number of ports to scan : \t"))
113+
ip = str(printer.inp("Enter a IP address OR domain : \t"))
114+
port_range = int(printer.inp("Enter number of ports to scan : \t"))
117115
port_scanner.Scan(ip, port_range)
118116

119117

120118
def handle_webhook_spammer() -> None:
121119
"""
122120
Handles the Webhook Spammer util.
123121
"""
124-
url = str(input("Enter a webhook url : \t"))
125-
amount = int(input("Enter a amount of messages : \t"))
126-
message = str(input("Enter a message : \t"))
127-
username = str(input("Enter a username : \t"))
128-
throttle = int(input("Enter time of sleep (seconds) : \t"))
122+
url = str(printer.inp("Enter a webhook url : \t"))
123+
amount = int(printer.inp("Enter a amount of messages : \t"))
124+
message = str(printer.inp("Enter a message : \t"))
125+
username = str(printer.inp("Enter a username : \t"))
126+
throttle = int(printer.inp("Enter time of sleep (seconds) : \t"))
129127
webhook_spammer.Spam(url, amount, message, username, throttle)
130128

131129

132130
def handle_whois_lookup() -> None:
133131
"""
134132
Handles the WhoIs Lookup util.
135133
"""
136-
domain = str(input("Enter a domain : \t"))
134+
domain = str(printer.inp("Enter a domain : \t"))
137135
whois_lookup.Lookup(domain)
138136

139137

@@ -143,9 +141,9 @@ def handle_sms_bomber() -> None:
143141
144142
Currently only works for US numbers.
145143
"""
146-
number = input("Enter the target phone number (with country code): \t")
147-
count = input("Enter the number of SMS to send: \t")
148-
throttle = input("Enter the throttle time (in seconds): \t")
144+
number = printer.inp("Enter the target phone number (with country code): \t")
145+
count = printer.inp("Enter the number of SMS to send: \t")
146+
throttle = printer.inp("Enter the throttle time (in seconds): \t")
149147
smsbomber.SMSBomber(number, count, throttle)
150148

151149

@@ -160,7 +158,7 @@ def handle_web_scrape() -> None:
160158
"""
161159
Handles the Web Scrape util.
162160
"""
163-
url = str(input(f"Enter a url : \t"))
161+
url = str(printer.inp(f"Enter a url : \t"))
164162
web_scrape.Scrape(url)
165163

166164

@@ -172,44 +170,46 @@ def handle_wifi_finder() -> None:
172170
wifi_finder.Scan()
173171

174172

175-
def handle_wifi_password_getter() -> None:
173+
def handle_wifi_vault() -> None:
176174
"""
177175
Handles the Wi-Fi Password Getter util.
178176
"""
179177
printer.info(f"Scanning for locally saved Wi-Fi passwords...")
180-
wifi_password_getter.Scan()
178+
wifi_vault.Scan()
181179

182180

183181
def handle_dir_buster() -> None:
184182
"""
185183
Handles the Dir Buster util.
186184
"""
187-
url = input(f"Enter a domain : \t")
185+
url = printer.inp(f"Enter a domain : \t")
188186
dirbuster.Scan(url)
189187

190188

191-
def handle_local_accounts_getter() -> None:
189+
def handle_local_user_enum() -> None:
192190
"""
193-
Handles the Local Accounts Getter util.
191+
Handles the Local User Enum.
194192
"""
195193
printer.info(f"Scanning for local accounts...")
196-
local_accounts_getter.Scan()
194+
printer.info(f"This is meant to be ran on a TARGET machine to gain (maybe) useful information.")
195+
time.sleep(1)
196+
local_user_enum.Scan()
197197

198198

199199
def handle_caesar_cipher() -> None:
200200
"""
201201
Handles the Caesar Cipher util.
202202
"""
203-
message = input("Enter a text to cipher/decipher : \t")
204-
mode = str(input("Enter a mode (encrypt/decrypt/bruteforce) : \t"))
203+
message = printer.inp("Enter a text to cipher/decipher : \t")
204+
mode = str(printer.inp("Enter a mode (cipher/decipher/bruteforce) : \t"))
205205
caesar_cipher.CaesarCipher(message, mode)
206206

207207

208208
def handle_basexx() -> None:
209209
"""
210210
Handles the BaseXX util.
211211
"""
212-
message = input("Enter a text to encode/decode : \t")
213-
mode = str(input("Enter a mode (encode/decode) : \t"))
214-
encoding = str(input("Enter a encoding (64/32/16) : \t"))
212+
message = printer.inp("Enter a text to encode/decode : \t")
213+
mode = str(printer.inp("Enter a mode (encode/decode) : \t"))
214+
encoding = str(printer.inp("Enter a encoding (64/32/16) : \t"))
215215
basexx.BaseXX(message, mode, encoding)

0 commit comments

Comments
 (0)