Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.40 KB | None | 0 0
  1. ###############################
  2. #############Login#############
  3. ###########Coded By############
  4. ##########Zack Ruddle##########
  5. ###############################
  6.  
  7.  
  8. from sys import exit
  9.  
  10. def Login():
  11.     password_tries = 5
  12.     password = "dcgnumber1"
  13.    
  14.     while password_tries > 0:
  15.         password_input = raw_input("Enter Passcode: ")
  16.        
  17.         if password_input != password:
  18.             password_tries -= 1
  19.            
  20.             if password_tries == 0:
  21.                 print "You have reached the maximum amount of attempts, Program shutting down."
  22.                 raw_input("Press <ENTER> to exit...")
  23.                 exit(1)
  24.             else:
  25.                 Pass
  26.         else:
  27.             break
  28.            
  29.  
  30. def Pass():
  31.     username_tries = 3
  32.     username = ('Admin', 'root', 'zack')
  33.    
  34.     while username_tries > 0:
  35.         username_input = raw_input("/n" +"Enter Username: ")
  36.    
  37.     if username_input != username:
  38.         username_tries -= 1
  39.        
  40.         if username_tries == 0:
  41.             print "You have reached the maximum amount of attempts, Program shutting down."
  42.             raw_input("Press <ENTER> to exit...")
  43.             exit(1)
  44.         else:
  45.             Main
  46.     else:
  47.         break
  48.            
  49.    
  50. def Main():
  51.     print "Welcome to the secret page!"
  52.     print "program now shutting down"
  53.     raw_input ("Press <Enter> to exit...")
  54.     exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement