Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions ffpass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,15 @@ def lower_header(csv_file):
def readCSV(csv_file):
logins = []
reader = csv.DictReader(lower_header(csv_file))
for row in reader:
logins.append((rawURL(row["url"]), row["username"], row["password"]))
try:
for row in reader:
url = row["url"] if "url" in row else row["login_uri"]
username = row["username"] if "username" in row else row["login_username"]
password = row["password"] if "password" in row else row["login_password"]
logins.append((rawURL(url), username, password))
except KeyError as e:
logging.error(f"key not found {e.args[0]}")
sys.exit(1)
logging.info(f'read {len(logins)} logins')
return logins

Expand Down Expand Up @@ -306,7 +313,7 @@ def askpass(directory):
try:
key = getKey(directory, password)
except WrongPassword:
password = getpass("Master Password:")
password = getpass("Master Password: ")
else:
break
return key
Expand Down