44import hashlib
55import time
66import json
7+ import os
78import colorama
89from colorama import Fore , Style
910from zxcvbn import zxcvbn
1011
12+ clear = os .system ("clear" )
13+
14+ if clear == True :
15+ os .system ("cls" )
16+
1117colorama .init ()
1218print (Fore .RED )
1319
2026 \/ \/ \/ \/
2127BY: suchsoak
2228Github: https://github.com/suchsoak
23- V.1.0.2
29+ V.1.0.3
2430
2531[1] Strong
2632[2] Weak
27- [3] Have i been pwned
28-
29- ....................~~...~. ..
30- ........... .. .~..... . +~
31- ......... ....~.~. ........~.
32- ...... . ...... ......... .
33- ......~~~~.~~~~......... .~. .
34- ....~~~~~~~~~..~~~~~~ ... . .
35- ..~~~+~~~~~.~~~~~+oooo++~.....
36- ~~~~~~~~~.~.~~~+++ooooo++.....
37- ..~~~~~~~.~~+~+++ooo+++~......
38- ... . ..~~~+++++oo+++.........
39- ..... . .++++ooo+~. .........
40- ........ . .~++~.. ...........
41- ........... .~.. .............
33+ [3] Email (API)
34+ [4] Email Hash
35+ [5] Company
36+ [6] Have i been pwned
4237'''
4338
4439print (password1 )
@@ -48,7 +43,7 @@ class password():
4843 try :
4944 colorama .init ()
5045 print (Fore .RED )
51- Type = input ('Strong, Weak or Have i been pwned : ' )
46+ Type = input ('Put the number : ' )
5247 print (Style .RESET_ALL )
5348 print (Style .RESET_ALL )
5449 if Type == "1" :
@@ -142,16 +137,64 @@ class password():
142137 time .sleep (1 )
143138 print (formatted_results )
144139 print ()
140+
145141 elif Type == '3' :
142+ email = input ("Put the email:" )
143+ API = input ("Put your API key:" )
144+ url = f"https://haveibeenpwned.com/api/v3/breachedaccount/{ email } "
145+ headers = {"hibp-api-key" : "{API}" }
146+ response = requests .get (url , headers = headers )
147+ if response .status_code == 200 :
148+ print ("[!] Yes, your email has been pwned." )
149+ elif response .status_code == 404 :
150+ print ("[!] No, your email has not been pwned." )
151+ else :
152+ print ("[!] Error occurred while checking for pwnage." )
153+
154+ elif Type == '4' :
155+ email_1 = input ("Put your Email:" )
156+ colorama .init ()
157+ print (Fore .RED )
158+ print ("\t " )
159+ Email = email_1
160+ hash_password = hashlib .sha1 (Email .encode ('utf-8' )).hexdigest ().upper ()
161+ url = f"https://api.pwnedpasswords.com/range/{ hash_password [:5 ]} "
162+ req = requests .get (url )
163+ hashes = req .text .split ('\n ' )
164+ pwned = False
165+ for hash in hashes :
166+ if hash .startswith (hash_password [5 :]):
167+ pwned = True
168+ break
169+ if pwned :
170+ print ("[!] Yes, your email has been pwned." )
171+ else :
172+ print ("[!] No, your email has not been pwned." )
173+
174+ elif Type == '5' :
175+ import os as s
176+ Company = input ("Put the Company:" )
177+ url_company = (f'{ Company } ' )
178+ if url_company :
179+ s .system (f'\n curl https://haveibeenpwned.com/api/v3/breach/{ Company } \n ' )
180+ if Company == None :
181+ print ("\n Had a problem, check if you have curl.\n " )
182+ if url_company == None :
183+ print ("\n Had a problem\n " )
184+ else :
185+ print (f"\n Don't have nothing about this company: { Company } \n " )
186+
187+ elif Type == '6' :
146188 colorama .init ()
147189 print (Fore .BLUE )
148190 have = '''
149- /\ /\ __ ___ ___
150- / |_| \_____ ___ __ ____ |__|\_ |__ ____ ____ ____ ______ __ _ __ ____ ____ __| _/
151- / \__ \ \ \/ // __ \ | | | __ \_/ __ \_/ __ \ / \ \____ \\ \/ \/ // \_/ __ \ / __ |
152- \ _ // __ \_\ /\ ___/_| | | \_\ \ ___/_ ___/_ | \| |_\ \\ /| | \ ___/_ /_/ |
153- \ | | /(____ / \_/ \___ /|__| |___ /\___ /\___ /___| /| ___/ \/\_/ |___| /\___ /____ |
154- \/ \/ \/ \/ \/ \/ \/ \/ |__| \/ \/ \/
191+ ___
192+ ______ __ _ __ ____ ____ __| _/
193+ \____ \\ \/ \/ // \_/ __ \ / __ |
194+ | |_\ \\ /| | \ ___/_ /_/ |
195+ | ___/ \/\_/ |___| /\___ /____ |
196+ |__| \/ \/ \/
197+
155198 '''
156199 print (have )
157200 print (Style .RESET_ALL )
@@ -170,17 +213,18 @@ class password():
170213 if hash .startswith (hash_password [5 :]):
171214 pwned = True
172215 break
173- if pwned :
216+ if pwned :
174217 print ("[!] Yes, your password has been pwned." )
175218 else :
176219 print ("[!] No, your password has not been pwned." )
177220 print (Style .RESET_ALL )
178221 else :
179222 colorama .init ()
180223 print (Fore .RED )
181- print ("You need chosse 1 or 2 " )
224+ print ("You need chosse a number " )
182225 print (Style .RESET_ALL )
183226 print ()
227+
184228 except KeyboardInterrupt :
185229 print ('program stopped' )
186230 except Exception as error :
0 commit comments