Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- moderate = """QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890"""
- weak = """qwertyuiopasdfghjklzxcvbnm1234567890"""
- strong = """QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890!@#$%^&*()[]{}\|?/<>"""
- strength = input("How strong u want ur pwd to be ? (W , M , S)")
- num = int(input("How long u want ur pwd to be ?"))
- if strength == "W" or strength == "w":
- pwd = random.sample(set(weak),num)
- strength = "weak"
- elif strength == "M" or strength == "m":
- pwd = random.sample(set(moderate),num)
- strength = "moderate"
- elif strength == "S" or strength == "s":
- pwd = random.sample(set(strong),num)
- strength = "strong"
- print "Your "+ strength + " pwd is " + "".join(pwd) + " which is " + str(num) + " characters long."
Add Comment
Please, Sign In to add comment