Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- from colorama import init,Style,Fore,Back
- init()
- def generate():
- chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO\
- PQRSTUVWXYZ0123456789`~!@#$%^&*()_+=-|\\}]{[:;\"\'?/.>,<"
- print(Style.BRIGHT + Fore.GREEN + 'Password length: \n>>> ',end='')
- pw_length = int(input(''))
- print('Number of passwords: \n>>> ',end='')
- num_of_pw = int(input(''))
- pw = ''
- pw_list = ''
- for i in range(num_of_pw):
- for i in range(pw_length):
- next_index = random.randrange(len(chars))
- pw = pw + chars[next_index]
- pw_list = pw + '\n'
- print(Style.RESET_ALL + Fore.RESET, end='')
- print(pw_list)
- #return pw_list
- generate()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement