Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #not running
- #this program has been updated and is split into 3 parts, pm if u want the code unless your a pro at python and not like me dummy ;D
- import linecache
- def user():
- with open('user.txt', 'a') as f:
- usr = input('Enter your username :')
- pwd = input('Enter your password :')
- f.write('Username - ' +usr+ '\nPassword - ' +pwd)
- def validate():
- with open('user.txt', 'r') as f:
- line = linecache.getline('user.txt',2)
- check = line.split('-')[1].strip()
- temp = input('Enter your Password :')
- if check == temp:
- print('Acces Granted!')
- else :
- print('Access Denied!!!!')
- choice = int(input('Press 1 to Enter a user in the Database\nPress 2 to validate the user\nEnter your Choice :'))
- if choice == 1:
- user()
- elif choice == 2:
- validate()
- else :
- print('WRONG CHOICE!')
Add Comment
Please, Sign In to add comment