From b13f4157f1b7f4dca686990f4b8554a13ccafac4 Mon Sep 17 00:00:00 2001 From: dadevel Date: Tue, 25 Jun 2024 23:35:55 +0200 Subject: [PATCH] chrome: fix crash on empty dpapi blob --- pypykatz/dpapi/dpapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypykatz/dpapi/dpapi.py b/pypykatz/dpapi/dpapi.py index 92125e0..e4f9df7 100644 --- a/pypykatz/dpapi/dpapi.py +++ b/pypykatz/dpapi/dpapi.py @@ -779,7 +779,7 @@ def decrypt_all_chrome(self, dbpaths, throw = False): dec_val = cipher.decrypt(ciphertext, b'', tag) results['cookies'].append((dbpaths[username]['cookies'], host_key, name, path, dec_val )) results['fmtcookies'].append(DPAPI.cookieformatter('https://' + host_key, name, path, dec_val)) - else: + elif encrypted_value: dec_val = self.decrypt_blob_bytes(encrypted_value) results['cookies'].append((dbpaths[username]['cookies'], host_key, name, path, dec_val )) results['fmtcookies'].append(DPAPI.cookieformatter('https://' + host_key, name, path, dec_val))