Merge pull request 'fixed the password visibility problem' (#3) from victoriash/2025-plovdiv-git:fix into main
Reviewed-on: #3 Reviewed-by: Tiziano Zito <otizonaizit@noreply.localhost>
This commit is contained in:
commit
33469b8840
1 changed files with 3 additions and 2 deletions
|
@ -1,16 +1,17 @@
|
|||
import getpass # hides types characters, very useful
|
||||
import json
|
||||
import sys
|
||||
|
||||
def get_credentials():
|
||||
username = input('Enter your username: ')
|
||||
password = input('Enter your password: ')
|
||||
password = getpass.getpass('Enter your password: ')
|
||||
return (username, password)
|
||||
|
||||
def authenticate(username, password, pwdb):
|
||||
return password == pwdb[username]
|
||||
|
||||
def add_user(username, pwdb):
|
||||
pwdb[username] = input(f'Enter password for {username}: ')
|
||||
pwdb[username] = getpass.getpass(f'Enter password for {username}: ')
|
||||
return pwdb
|
||||
|
||||
def read_pwdb(pwdb_path):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue