Building password generator– Python

Password generator:

This password generator, you can change the password length and character of possible passwords

Used: import random , for

To copy or see all commands you can click on Details button below




author: Hopeless
task: prog will generate random password according to user defined length

import random

allchars = ‘abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~!@#$%^&*()-=+?’

passlen = 10
password = ”

for i in range(0,passlen):
password += allchars[random.randrange(0,len(allchars))]

print password





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s