I would like to write the script that produces at least 6 encrypted password using crypt module and save them in a file called password.txt
but I get error?
and How can I add more than 6 encrypted password ?
import crypt import random, string password = input("Please ender your password? ") def getsalt(chars = string.letters + string.digits): # generate a random 2-character 'salt' return random.choice(chars) + random.choice(chars) print crypt.crypt(password, getsalt()) output Please ender your password? python Traceback (most recent call last): File "./crypt.py", line 4, in <module> password = input("Please ender your password? ") File "<string>", line 1, in <module> NameError: name 'python' is not defined
Edited by tony75