mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-03 15:47:18 -04:00
Hide input when creating or editing a password
Former-commit-id: b7224d0533bdb5c82d31d6854fe03c04b3efa6c1 Former-commit-id: 6af841f88fc4ae05c9bfec463b947d82bb5968d6
This commit is contained in:
+4
-2
@@ -408,8 +408,9 @@ def add_entry():
|
|||||||
_password, _username, _url, _note = '', '', '', edit_note([])
|
_password, _username, _url, _note = '', '', '', edit_note([])
|
||||||
else:
|
else:
|
||||||
# password entry
|
# password entry
|
||||||
|
from getpass import getpass
|
||||||
_username = str(input('\nusername: '))
|
_username = str(input('\nusername: '))
|
||||||
_password = str(input('\npassword: '))
|
_password = str(getpass(prompt='\npassword: '))
|
||||||
_url = str(input('\nurl: '))
|
_url = str(input('\nurl: '))
|
||||||
if input('\nadd a note to this entry? (y/N) ').lower() == 'y':
|
if input('\nadd a note to this entry? (y/N) ').lower() == 'y':
|
||||||
_note = edit_note([])
|
_note = edit_note([])
|
||||||
@@ -474,7 +475,8 @@ def edit():
|
|||||||
if arguments[2] in ('username', '-u'):
|
if arguments[2] in ('username', '-u'):
|
||||||
_detail, _edit_line = str(input('\nusername: ')), 1
|
_detail, _edit_line = str(input('\nusername: ')), 1
|
||||||
elif arguments[2] in ('password', '-p'):
|
elif arguments[2] in ('password', '-p'):
|
||||||
_detail, _edit_line = str(input('\npassword: ')), 0
|
from getpass import getpass
|
||||||
|
_detail, _edit_line = str(getpass(prompt='\npassword: ')), 0
|
||||||
elif arguments[2] in ('url', '-l'):
|
elif arguments[2] in ('url', '-l'):
|
||||||
_detail, _edit_line = str(input('\nurl: ')), 2
|
_detail, _edit_line = str(input('\nurl: ')), 2
|
||||||
if arguments[2] in ('note', '-n'):
|
if arguments[2] in ('note', '-n'):
|
||||||
|
|||||||
Reference in New Issue
Block a user