Support Forums

Full Version: Password Generator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know Remembering secure passwords is difficult. So I made this.
Code:
import random, os
a= ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','{',':','>','?','}','|','!','@','#','$','%','^','&','*','(',')','-','+']

z = int(raw_input("How many words in your password?: "))
os.system("clear")
List = []
for x in xrange(z):
    List.append(random.choice(a))
print "".join(List)
print "1) Yes"
print "2) No"
b = int(raw_input("Would you like to save this password to a text file?: "))
if b == 1:
    c = raw_input("What is this password for?: ")
    x = open("%s.txt" % c, "w")
    y = "".join(List)
    x.write(y)
    x.close
    x = open("%s.txt" % c, "r")
    x.read
    print "Saved!"
elif b == 2:
    raw_input("Press Enter To Continue")
Dude thanks for the Py coding this is a must have. Smile
haha, Nevets you are getting much better Smile
Thanks for the script.

It appears everyone is making password generators now Tongue