Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. ## Muuttujiksi nämä, niin niitä on helpompi vaihtaa
  2. MASTER_USERNAME = 'iita'
  3. MASTER_PASSWORD = 'iita'
  4. SECURITY_LOCKDOWN_COUNT = 4
  5.  
  6. try = 0
  7. isCorrect = False
  8. while try < SECURITY_LOCKDOWN_COUNT and not isCorrect:
  9. ## ask new password
  10. print('Authenticate to Iita system')
  11. name = input('Name')
  12. password = input('Password')
  13. ## check if correct
  14. if name.lower() == MASTER_USERNAME and password.lover() == MASTER_PASSWORD:
  15. isCorrect = True
  16. else:
  17. print('Incorret authentication')
  18.  
  19. if isCorrext:
  20. print('Authentication OK')
  21. else:
  22. print('System has been locked')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement