Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sys import stdout
- from os import urandom
- def genCharset():
- lower = 'abcdefghijklmnopqrstuvwxyz'
- return '0123456789{}{}!@#$%^&*'.format(lower, lower.upper())
- def randomInteger(min, max):
- return (ord(urandom(1)) % (max - min)) + min
- if __name__ == '__main__':
- length, passlist, charset = 16, [], genCharset()
- for i in range(5):
- rand = ''
- for j in range(length):
- rand = '{}{}'.format(rand, charset[randomInteger(0,len(charset))])
- passlist.append(rand)
- for passwd in passlist:
- stdout.write('{}\n'.format(passwd))
Add Comment
Please, Sign In to add comment