From 9f2e641366d793e830aacf2513bb4ff06d0c5c1f Mon Sep 17 00:00:00 2001 From: smaury Date: Sat, 13 Nov 2021 12:56:57 +0100 Subject: [PATCH] fixed utf-8 issue --- webtech/__version__.py | 2 +- webtech/database.py | 4 ++-- webtech_example.py | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/webtech/__version__.py b/webtech/__version__.py index 651e278..01aff1e 100644 --- a/webtech/__version__.py +++ b/webtech/__version__.py @@ -1,2 +1,2 @@ # DON'T EDIT THIS FILE -__version__ = "1.3" +__version__ = "1.3.1" diff --git a/webtech/database.py b/webtech/database.py index 0d6a490..17f07d2 100644 --- a/webtech/database.py +++ b/webtech/database.py @@ -84,8 +84,8 @@ def merge_partial_wappalyzer_database(): This helper function merges a partial wappalyzer db with the other ones. """ - with open(WAPPALYZER_DATABASE_FILE, 'r+') as f1: - with open(os.path.join(DATA_DIR,"temp.json")) as f2: + with open(WAPPALYZER_DATABASE_FILE, 'r+', encoding='utf-8') as f1: + with open(os.path.join(DATA_DIR,"temp.json"), 'r', encoding='utf-8') as f2: current = json.load(f1) temp = {"apps": json.load(f2)} f1.seek(0) diff --git a/webtech_example.py b/webtech_example.py index a21cdcd..d5cbefd 100644 --- a/webtech_example.py +++ b/webtech_example.py @@ -1,6 +1,9 @@ #!/usr/bin/env python3 import webtech +# make sure to have the latest db version +webtech.database.update_database(force=True) + # you can use options, same as from the command line wt = webtech.WebTech(options={'json': True})