Advertisement
Adm1n_0v3rride

Password generator

May 11th, 2017
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. #! usr/bin/python
  2.  
  3. import string
  4. import random
  5.  
  6. def generatePassword(num):
  7.     password = ''
  8.    
  9.     for n in range(num):
  10.         x = random.randint(10,94)
  11.         password += string.printable[x]
  12.        
  13.     return password
  14.  
  15. #you can change the length of the password where the number 16 is and make the password longer.
  16.    
  17. print generatePassword(16)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement