def Signup(): if internet(): Name = wait_for_input('Enter Your Name: ') import re ECon = None while ECon == None: Email = input('Email: ') ECon = re.search(r'[^@]+@[^@]+\.[^@]+', Email) if ECon == None: print('Wrong Email Address. Try again.', 'red') Password = '' while len(Password) < 4: Password = input('Type Your Main Password: '******'Main Password Should Contain Atleast 4 Characters.', 'red') print('Creating Account...', 'dodger_blue_1') wait(0.15) print('Creating Database...', 'dodger_blue_1') Send_INFO(Email, Name, Password, 'Signup') Enc_INFO = [] Enc_INFO.append([Decrypt(char, '4') for char in Name]) Enc_INFO.append([Decrypt(char, '4') for char in Email]) hashed = hashlib.sha3_256(bytes(Password, encoding='utf-8')).hexdigest() Enc_INFO.append([char for char in hashed]) write('PL', 'InfoE={}\nPL=[]'.format(Enc_INFO)) wait(0.15)
def wtc(): try: WTC = int( input('Enter Password Number That You Want to Change: ')) if WTC > nom: print('Number out of the range! (Max= {})\n'.format(nom), 'red') wtc() else: print() NP = input(f'Type New Password of {PaLi[WTC][0]} : ') if NP and NP != PaLi[WTC][2]: for item in PLD: #for item in items: if item == PaLi[WTC]: item[2] = NP ind = PLD.index(item) PLE[ind][2] = [ord(char) for char in NP] write('PL', 'InfoE={}\nPL={}'.format(InfoE, PLE)) print('Password Has Been Successfully Changed.') else: print('Password did not change') except ValueError: print('Enter Only Number\n') wtc()
def REMOVE(): DEL = input('Type Number: ') try: DEL = int(DEL) PLE.remove(PLE[DEL]) PLD.remove(PLD[DEL]) write('PL', 'InfoE={}\nPL={}'.format(InfoE, PLE)) print('Password Has Been Successfully Removed From Database.', 'green') except ValueError: print('Enter Only Number\n') REMOVE()
def hash_dict_creator(input_list: Iterable, output_file_name: str, encryption_type: str) -> None: ''' Create Hash file of a specifiec Hash Type ''' hashesToExport = [] encryption_type = sa[encryption_type] for word in input_list: crypt = encryption_type() crypt.update(bytes(word, encoding='utf-8')) hashOfWord = crypt.hexdigest() hashesToExport.append(hashOfWord) # Creating the output file rx.write(output_file_name, '\n'.join(hashesToExport))
def print_hashes(word, file=None, Print=True): word = bytes(word, encoding='utf-8') LIST = [] for name, func in sa.items(): try: result = func(word).hexdigest() LIST.append(result) if Print: print(f' {name.upper()}:{" "*(10-len(name))}{result}') except TypeError: pass if file: rx.write(str(file), '\n'.join(result))
N_C = input('Type Category: ') if N_C == '': N_C = 'Uncategorized' #Dec PLD.append([N_N, N_U, N_P, N_C]) #Enc N_N = [Encrypt(char, '7') for char in N_N] N_U = [Encrypt(char, '7') for char in N_U] N_P = [Encrypt(char, '7') for char in N_P] N_C = [Encrypt(char, '7') for char in N_C] N_L = [N_N, N_U, N_P, N_C] PLE.append(N_L) write('PL', 'InfoE={}\nPL={}'.format(InfoE, PLE)) print('Password Has Been Successfully Added to Database.', 'green') Backup_CPD('PL') getpass.getpass('\nPress Enter') elif INP == '3': DIC = {} i = 0 for PASSWORD in PLD: for SECTIONS in PASSWORD: if SECTIONS is PASSWORD[0]: DIC[i] = SECTIONS i += 1 for item in DIC: print(f'{item} => {DIC[item]}')
print('\n') cbfyn = input('Create Hash Bruteforce File? (Y/n) ') if cbfyn.lower() in ('y', 'yes'): crypt_lst = [ hashlib.md5, hashlib.sha1, hashlib.sha224, hashlib.sha256, hashlib.sha384, hashlib.sha512, hashlib.sha3_224, hashlib.sha3_256, hashlib.sha3_384, hashlib.sha3_512 ] file_content = '' oh = input('Create Hashes Only (Y/n): ') if oh in ('y', 'yes'): for item in main_dic.values(): item = bytes(item, encoding='utf-8') for crypt in crypt_lst: file_content += f'{crypt(item).hexdigest()}\n' write(f'{password}.txt', file_content) title = '' else: crypt_name = [ 'md5: ', 'sha1: ', 'sha224: ', 'sha256: ', 'sha384: ', 'sha512: ', 'sha3_224: ', 'sha3_256: ', 'sha3_384: ', 'sha3_512: ' ] for item in main_dic.values(): file_content += f'{item}\n' item = bytes(item, encoding='utf-8') for crypt in crypt_lst: file_content += f' {crypt_name[crypt_lst.index(crypt)]}{crypt(item).hexdigest()}\n' file_content += '\n' title = f'Caesar Hash Bruteforce of {password}\n\n'
def hash_dict_creator_all(input_list: Iterable, output_file_name: str) -> None: ''' Create All Types of Hashes ''' try: output_file_name = output_file_name.split('.')[0] ext = output_file_name.split('.')[1] except IndexError: ext = 'txt' for word in input_list: word = bytes(word, encoding='utf-8') # To save memory I did not save the hashes in seprate lists. # Instead, I directly add them to their files # But you can add them to specifiec list ( like hash_file_creator() ) # and then write them to files rx.write(output_file_name + '_md5.' + ext, str(hashlib.md5(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha1.' + ext, str(hashlib.sha1(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha224.' + ext, str(hashlib.sha224(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha256.' + ext, str(hashlib.sha256(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha384.' + ext, str(hashlib.sha384(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha512.' + ext, str(hashlib.sha512(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha3-224.' + ext, str(hashlib.sha3_224(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha3-256.' + ext, str(hashlib.sha3_256(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha3-384.' + ext, str(hashlib.sha3_384(word).hexdigest()) + '\n', 'continue') rx.write(output_file_name + '_sha3-512.' + ext, str(hashlib.sha3_512(word).hexdigest()) + '\n', 'continue')