diff --git a/bin/updater/src/Scraper.py b/bin/updater/src/Scraper.py index 69a325e..948164b 100644 --- a/bin/updater/src/Scraper.py +++ b/bin/updater/src/Scraper.py @@ -1,7 +1,7 @@ import re import requests import urllib.parse -import binascii +import hashlib import colorama import logging @@ -204,7 +204,7 @@ class Scraper: Check version from HTTP headers. :param headers: HTTP headers - :return: Version string + :return: Version string (SHA-1 based) """ local_version = self.tool_config.get('local_version', '0') @@ -212,11 +212,11 @@ class Scraper: if 'last-modified' in headers: logging.info(f'{self.tool_name}: using "last-modified" as version number...') input_bytes = headers['last-modified'].encode() - remote_version = str(binascii.crc32(input_bytes)) + remote_version = hashlib.sha1(input_bytes).hexdigest() elif 'content-length' in headers: logging.info(f'{self.tool_name}: using "content-length" as version number...') input_bytes = headers['content-length'].encode() - remote_version = str(binascii.crc32(input_bytes)) + remote_version = hashlib.sha1(input_bytes).hexdigest() else: raise Exception(colorama.Fore.RED + f'{self.tool_name}: no header is found with which to determine if there is an update') diff --git a/bin/updater/src/UpdateManager.py b/bin/updater/src/UpdateManager.py index f686340..8ca2f51 100644 --- a/bin/updater/src/UpdateManager.py +++ b/bin/updater/src/UpdateManager.py @@ -19,7 +19,7 @@ class UpdateManager: """ Initialize the UpdateManager with a ConfigManager instance and command-line arguments. """ - self.version = '2.0.0' + self.version = '2.1.0' self.config_file_name = 'tools.ini' self.config_section_defaults = 'UpdaterConfig' self.config_section_self_update = 'UpdaterAutoUpdater' diff --git a/bin/updater/updater.exe b/bin/updater/updater.exe index fdd31e9..16b2056 100644 Binary files a/bin/updater/updater.exe and b/bin/updater/updater.exe differ