Created
December 4, 2015 13:56
-
-
Save Issacx/dc92bfb39344e3bf7764 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
def writePassword(password) | |
passwd = raw_input('Enter your password: ') | |
file = 'pass.txt' | |
try: | |
if !(os.path.exists): | |
oFile = open(file, 'wr+') | |
oFile.write(passwd) | |
oFile.close | |
except: | |
print('Failed to write the password to the file.') | |
def login(self, pin): | |
self.pin = pin | |
incorrectTimes = 0 | |
enterPin = raw_input('Enter Pin (Default is 0000)') | |
correctPin | |
if enterPin.length >= 4 || enterPin.length <= 4: | |
print('Invalid!') | |
incorectTimes = incorectTimes + 1 | |
elif correctPin != enterPin: | |
print('Access Denied') | |
writePassword(passwd) | |
login(enterPin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment