mirror of
https://github.com/indetectables-net/toolkit.git
synced 2025-06-21 18:30:51 +00:00
Bump Universal Updater to 2.1.0
This commit is contained in:
parent
df0bd89bf9
commit
4e06483d43
@ -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')
|
||||
|
@ -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'
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user