From 7b886e6b550571a2c05187c0068c8a9bba801834 Mon Sep 17 00:00:00 2001 From: rafa_br34 Date: Tue, 10 Sep 2024 02:27:41 -0300 Subject: [PATCH] Fix edge case --- firepwd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firepwd.py b/firepwd.py index c1d3182..009c0e2 100644 --- a/firepwd.py +++ b/firepwd.py @@ -201,6 +201,8 @@ def getLoginData(): print ('error: no \'logins\' key in logins.json') return [] for row in jsonLogins['logins']: + if 'encryptedUsername' not in row or 'encryptedPassword' not in row: + continue encUsername = row['encryptedUsername'] encPassword = row['encryptedPassword'] logins.append( (decodeLoginData(encUsername), decodeLoginData(encPassword), row['hostname']) )