Advertisement
here2share

# b_strong_password_generator.py

Jul 25th, 2022
1,239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. # b_strong_password_generator.py
  2.  
  3. import random
  4. import string
  5.  
  6. words = string.ascii_uppercase
  7. words2 = string.ascii_lowercase
  8. numbers = string.digits
  9. spec_char = '!@#$%'
  10.  
  11. password = []
  12. for i in range(2):
  13.     password += [random.choice(words)]
  14. for i in range(2):
  15.     password += [random.choice(words2)]
  16. for i in range(2):
  17.     password += [random.choice(numbers)]
  18. for i in range(2):
  19.     password += [random.choice(spec_char)]
  20. for i in range(8):
  21.     password += [random.choice(words+words2+numbers+spec_char)]
  22. random.shuffle(password)
  23. password = ''.join(password)
  24. print(password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement