Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import*
- class colors:
- end='\033[0m'
- underline='\033[04m'
- class fg:
- red='\033[31m'
- green='\033[32m'
- a = int(input("Введите количество знаков в пароле "+colors.fg.green+"(от 8 до 16 знаков)"+colors.end+":"))
- print(" ")
- number = "0123456789"
- new_string = "qwertyuiopasdfghjklzxcvbnm"
- up_string = new_string.upper()
- new_russian = "йцукенгшщзхъфывапролджэячсмитьбю"
- up_russian = new_russian.upper()
- symbols = "!@#$%^&*()-_=+"
- password = number + new_string + up_string + new_russian + up_russian + symbols
- List = list(password)
- shuffle(List)
- user_password = ''.join([choice(List) for x in range(a)])
- if (a<8)or(a>16):
- print(colors.fg.red + "Error" + colors.end)
- else:
- print(colors.fg.green + "Ваш пароль: " + colors.end + user_password)
- print(colors.fg.red + colors.underline + "ПРИМЕЧАНИЕ" + colors.end + colors.fg.red + ": " + colors.end + colors.fg.red + colors.underline + "Сохраните данный пароль в надежное место, и никому его не сообщайте." + colors.end)
- print(" ")
- print(colors.fg.green+"Если вам НЕ нравится этот пароль - вы можете перезапустить программу."+colors.end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement