Advertisement
pacho_the_python

key gen

Jan 26th, 2023
781
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import random
  2.  
  3. upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  4. lower = "abcdefghijklmnopqrstuvwxyz"
  5. nums = "1234567890"
  6. symbols = "!@#$%^&*()_+|}{<>?[]="
  7.  
  8. keys = open("some_keys.txt", "w+")
  9.  
  10. combination = upper + lower + nums + symbols
  11.  
  12. counter = 0
  13.  
  14. while True:
  15.     result = "".join(random.choices(combination, k=10))
  16.     counter += 1
  17.     if counter > 50:
  18.         break
  19.     keys.write(f"{result} \n")
  20.     print(f"{result}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement