Skip to content

Commit 827ba94

Browse files
authored
.exe file are here.
1 parent aabd8d5 commit 827ba94

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

passwdmanager.exe

9.17 MB
Binary file not shown.

passwdmanager.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
icmd = input("Enter ID:")
4949
if icmd=='':
50-
print("\033[1;31;40m Error id. \033[1;37;40m")
50+
print("\033[1;31;40m Error id. \033[1;37;40m\n")
5151
else:
5252
d.execute("SELECT id,name FROM db_password.tb_nap WHERE id= %s",(icmd,)) #select id,name from id input
5353
i.execute("SELECT password FROM db_password.tb_nap WHERE id= %s",(icmd,)) #select password from id input
@@ -71,7 +71,7 @@
7171
decrypted = decrypted = f.decrypt(p_encode) #decrypted
7272
ogpasswd = decrypted.decode() #decode from byte to string
7373

74-
print("Password for",p,"is",ogpasswd) #show id,name,password
74+
print("Password for",p,"is",ogpasswd,"\n\n") #show id,name,password
7575

7676

7777
#insert
@@ -81,7 +81,7 @@
8181
p = input("password>")
8282

8383
if n=='' or p=='': #detect blank input
84-
print("\033[1;31;40m Can't insert into database.Plese input all of data. \033[1;37;40m")
84+
print("\033[1;31;40m Can't insert into database.Plese input all of data. \033[1;37;40m\n")
8585
else:
8686
k = ("key") #set key
8787
k_encode = k.encode() #encode key to byte
@@ -104,14 +104,14 @@
104104
mycursor.execute(sql, val)
105105
mydb.commit() #confirm operation to database
106106

107-
print(mycursor.rowcount, "password inserted") #show number(s) of query that have inserted
107+
print(mycursor.rowcount, "password inserted\n\n") #show number(s) of query that have inserted
108108

109109
#delete
110110
elif cmd == 'd' or cmd == 'D':
111111
mycursor.execute("SELECT id,name FROM db_password.tb_nap") #select id,name from db
112112
myresult = mycursor.fetchall()
113113
for x in myresult: #show id,name query in database
114-
print("What you want to delete")
114+
print("What you want to delete?")
115115
print(x)
116116

117117
i = input("Enter id:") #enter query id
@@ -123,8 +123,10 @@
123123
mycursor.execute(sql, (i,))
124124
mydb.commit() #confirm operation to database
125125

126-
print(mycursor.rowcount, "name and password deleted") #show number(s) of query that have deleted
126+
print(mycursor.rowcount, "name and password deleted\n\n") #show number(s) of query that have deleted
127127

128128
#error
129129
else :
130-
print("\033[1;31;40m Error,Can't define command...plese try again \033[1;37;40m\n")
130+
print("\033[1;31;40m Error,Can't define command...plese try again \033[1;37;40m\n")
131+
132+
os.system('pause')

0 commit comments

Comments
 (0)