Guest User

Untitled

a guest
Nov 23rd, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. import random
  2.  
  3. moderate = """QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890"""
  4. weak = """qwertyuiopasdfghjklzxcvbnm1234567890"""
  5. strong = """QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890!@#$%^&*()[]{}\|?/<>"""
  6.  
  7.  
  8. strength = input("How strong u want ur pwd to be ? (W , M , S)")
  9. num = int(input("How long u want ur pwd to be ?"))
  10.  
  11. if strength == "W" or strength == "w":
  12. pwd = random.sample(set(weak),num)
  13. strength = "weak"
  14.  
  15. elif strength == "M" or strength == "m":
  16. pwd = random.sample(set(moderate),num)
  17. strength = "moderate"
  18.  
  19. elif strength == "S" or strength == "s":
  20. pwd = random.sample(set(strong),num)
  21. strength = "strong"
  22.  
  23. print "Your "+ strength + " pwd is " + "".join(pwd) + " which is " + str(num) + " characters long."
Add Comment
Please, Sign In to add comment