aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xextract_token_from_browser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/extract_token_from_browser.py b/extract_token_from_browser.py
index 36fe491..b68b53e 100755
--- a/extract_token_from_browser.py
+++ b/extract_token_from_browser.py
@@ -275,6 +275,7 @@ elif browser == "chrome":
try:
db = DB(str(leveldb_path))
local_storage_value = db.get(leveldb_key)
+ db.close()
except pIOErr:
with tempfile.TemporaryDirectory(
dir=local_storage_path, prefix="leveldb-", suffix=".tmp"
@@ -282,6 +283,7 @@ elif browser == "chrome":
shutil.copytree(leveldb_path, tmp_dir, dirs_exist_ok=True)
db = DB(tmp_dir)
local_storage_value = db.get(leveldb_key)
+ db.close()
local_config = json.loads(local_storage_value[1:]) if local_storage_value else None