Advertisement
adham-ahmed

Advanced Customizable Password Generator

Apr 18th, 2022
1,368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1.  
  2. #When you hit run you will can select the length of the passwords and how many you want to be generated + infinite password loop code
  3. import random
  4. print("Max length is 70")
  5. print("If you want infinite password put \n 01010101010101")
  6. print("Just copy it")
  7. lower = "abcdefghijklmnopqrstuvwxyz"
  8. upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  9. numbers = "1234567890"
  10. symbols = "!@#$%^&*"
  11. String = lower + upper + numbers + symbols
  12. NumbersToBePrinted = int(input("How many passwords you want to be generated: "))
  13. length = int(input("What is the length of the password you want: "))
  14. for i in range(NumbersToBePrinted):
  15.     print("".join(random.sample(String, length)))
  16. if NumbersToBePrinted == "01010101010101":
  17.     while True:
  18.         print("".join(random.sample(String, length)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement