Skip to content

Commit

Permalink
Added in a password to launch the application
Browse files Browse the repository at this point in the history
  • Loading branch information
SVijayB committed Jul 8, 2020
1 parent 5d9d752 commit 604bfe7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
27 changes: 26 additions & 1 deletion Password Manager/src/Password_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sqlite3
from getpass import getpass
import os
import sys
from Modules.Functions import *
from Modules.Colours import *

Expand All @@ -16,6 +17,30 @@
except:
pass

try:
file = open('../temp/password.txt', 'r')
password = file.read()
while(True):
entered_password = input("Enter your password \n> ")
if(password == entered_password):
green("Logged in successfully")
grey("Press any key to continue...")
input()
break
else:
red("Incorrect password")
except:
print("Since, this is the first time you are using Password_manager, Create a password")
cyan("NOTE : DO NOT FORGET THIS PASSWORD. YOU CANNOT CHANGE IT LATER")
password = input("Enter your password \n> ")
file = open('../temp/password.txt', 'w')
file.write(password)
green("Your password has been saved successfully")
cyan("Relaunch the application to continue....")
grey("Press enter to exit...")
input()
sys.exit(0)

os.system('cls')
logo = open("../assets/logo.txt","r")
output = "".join(logo.readlines())
Expand Down Expand Up @@ -93,7 +118,7 @@

elif(choice == 8):
green("\n-----x Thanks for using Password_manager x-----")
grey("Press any key to exit...")
grey("Press enter to exit...")
input()
conn.close()
break
Expand Down
1 change: 1 addition & 0 deletions Password Manager/temp/key.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0mPzxgOAPwATxKGLZjfWsyG2hrYNgoQVtieC4ypLcFw=

0 comments on commit 604bfe7

Please sign in to comment.