Building password generator– Python

Password generator:

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

Used: import random , for

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

 

 

#!/usr/bin/python

”’
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

 

 

Untitled.png

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s