Advertisement
Guest User

Untitled

a guest
Aug 28th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. print ('Welcome to core manager 8.3. please log in.' Login message
  2. usernames = ['admin'] Login system
  3. passwords = ['admin']
  4.  
  5.  
  6. class Log:
  7.  
  8. def __init__(self, username, password):
  9. self.username = username
  10. self.password = password
  11. print(self.username)
  12. print(self.password)
  13. if self.username in usernames:
  14. self.checkPass()
  15. else:
  16. self.badUser()
  17.  
  18. def loginSuccessful(self):
  19. print ("Welcome, Admin!")
  20.  
  21. def checkPass(self):
  22. if self.password in passwords:
  23. self.loginSuccessful()
  24. else:
  25. self.badPass()
  26.  
  27. def badUser(self):
  28. print("Username does not match, please try again.")
  29.  
  30. def badPass(self):
  31. print ("Password does not match, please try again.")
  32.  
  33. username = input("Please enter your username: ")
  34. password = input("Please enter your password: ")
  35.  
  36.  
  37. login = Log(username, password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement