randpass.py - a random password generator in python


SUBMITTED BY: Guest

DATE: Oct. 9, 2014, 4:34 a.m.

FORMAT: Python

SIZE: 743 Bytes

HITS: 1028

  1. #!/usr/bin/env python
  2. #randpass.py - <3
  3. #Just a simple random password generator in Python
  4. #"Random" isn't so random, actually..
  5. #http://scaredkid.org/
  6. #this makes robotic 16 character passwords
  7. #I can't keep coding without BTC: 1JmS81r4n11WmfUUKJfKUfp7Weym6p7iqN
  8. import random
  9. print 'randpass.py - random fucking passwords\nhttp://scaredkid.org/\n'
  10. charblock = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*"
  11. character_data_length = 16
  12. password = ""
  13. for i in range(character_data_length):
  14. next_index = random.randrange(len(charblock))
  15. password = password + charblock[next_index]
  16. print 'Your 16 character password is: ' + (password)
  17. #EOF

comments powered by Disqus