Skip to content

Instantly share code, notes, and snippets.

@Issacx
Created December 4, 2015 13:56
Show Gist options
  • Save Issacx/dc92bfb39344e3bf7764 to your computer and use it in GitHub Desktop.
Save Issacx/dc92bfb39344e3bf7764 to your computer and use it in GitHub Desktop.
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