import random, string
def generate_password(length: int=4)-> str:
# add lower case chars
lower = [random.choice(string.ascii_lowercase) for i in range(length)]
# add digit chars
digit = [random.choice(string.digits) for i in range(length)]
# add upper case chars
upper = [random.choice(string.ascii_uppercase) for i in range(length)]
# add symbols
symbol = [random.choice(["!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "-", "+", "=", ".", ",", "?"]) for i in range(length)]
# store random generated lists to a variable
original = lower+digit+upper+symbol
# shuffle stored data in place
random.shuffle(original)
return ''.join(original)
import random
strong_keys = ["@","#","$","£","π","¥","&","3","¢","3","*","?","!","%","/","G","A","B","F","W","F","H","6","9",":","^","=","|","~","∆"]
def password():
try:
n = int(input('your password contain(type in number) : '))
except:
print('Rerun the program and type in number please')
ans = ""
for i in range(n):
rand = random.choice(strong_keys)
if i == 0:
ans = rand
else:
ans += rand
print('
your password: '+ans+'
')
user = input('if you dont like this?
Type "r" else "q" : ')
if user.lower() == 'r':
password()
else:
quit()
password()
import random
name = input('What is your name? (It will be used in the password) ')
sletters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
bletters = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
others = ['`', '~', '!', '@', '#', '$', '%', '^', '&', '*']
rs = random.choice(sletters)
rs2 = random.choice(sletters)
rb = random.choice(bletters)
rb2 = random.choice(bletters)
rn = random.choice(numbers)
rn2 = random.choice(numbers)
ro = random.choice(others)
ro2 = random.choice(others)
password = name + rs + rb + rs2 + rn + ro + rn2 + rb2 + ro2
print(password)
from random import randint
import pyperclip
allSymbols = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '- ', '=', '`', '~', '!', '@', '#', '$', '%', '^', '&', '*', ' (', ' )', ' ¹', '²', '³', '⁴', '⁵', '⁶', '⁷', '⁸', '⁹', '⁰', '¡', '¤', '€', '¼', '½', ' ¾', '‘', '’', 'æ', '©', '®', 'þ', '«', '»', '"', "'", 'ß', '§', 'ð', 'œ', 'Æ', 'Œ', 'ø', '¶', 'Ø', '°', '¿', '£', '‘¥', '÷', '×', '/', '?' ]
password = ' '
lenSymbols = len(allSymbols)
recycleMe = int(input("how much characters do you want your password to be? "))
for i in range(recycleMe):
password = password + allSymbols[randint(0, lenSymbols)]
print(password)
#pyperclip.copy(password)
#print("copied to clipboard")