Search This Blog

Friday 23 August 2013

Generate Random password using Python


#Random Password Generatation

    import random, string

    rand_obj = random.SystemRandom()
    length = 10 #specify lenth of your password
    password_string = string.letters[0:52] + string.digits  # concate the small , big alaphabet & numbers
    password = str().join(rand_obj.choice(password_string) for _ in range(length))
    #generate the password based on your alphabet string and lenght.

    print "Random Generated Password with 10 size lenght",password