Advertisement
Shad0w

Untitled

May 22nd, 2011
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. #!/usr/bin/env python
  2. import sys, random
  3. from time import sleep
  4.  
  5. def Random(INT): # random string generator
  6.     chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
  7.     randstring = ''
  8.     try:
  9.         x = random.sample(chars, INT)
  10.     except ValueError:
  11.         print '\n[-]Maximum number of characters is 62'
  12.         return None
  13.     randstring = randstring.join(x)
  14.     return randstring
  15.  
  16. while True:
  17.     try:
  18.         a = Random(62)
  19.         print a
  20.         sleep(0.02)
  21.     except KeyboardInterrupt:
  22.         sys.exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement