Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def createUser():
- """
- check usernames doesn't already exist
- check passwords inputs are the same
- and basic password strength test e.g. length, numbers, specail chars
- invalid chars not in data? might not be needed
- """
- NewUser=raw_input("Type your user name >>>")
- if UserExists(NewUser):
- Password=getpass.getpass("Type your password >>>")
- PasswordC=getpass.getpass("Confirm your password >>>")
- if Password==PasswordC:
- for index in range(len(Password)):
- if Password[index] in ALL:
- passwordSafe = True
- else:
- passwordSafe = False
- if passwordSafe:
- UsernamePsw=str("\n"+NewUser+","+Password)
- FileOpen=open("users.csv","a")
- FileOpen.write(UsernamePsw)
- FileOpen.close()
- Login()
- createUser()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement