diff --git a/bin/updater/bin/VBDEC-register.bat b/bin/updater/bin/VBDEC-register.bat new file mode 100644 index 0000000..bb7734b --- /dev/null +++ b/bin/updater/bin/VBDEC-register.bat @@ -0,0 +1,32 @@ +@ECHO OFF + +echo Register VBDEC program dlls +echo ---------------------------------------- +echo. + +1>nul 2>nul reg query HKU\S-1-5-19 || ( + echo You must run the command prompt as administrator to install. + ping 127.0.0.1 > NUL 2>&1 + exit /b 1 +) + + +cd "%~dp0" + +:: from {sys} +regsvr32 /s sys\richtx32.ocx +regsvr32 /s sys\MSCOMCTL.OCX +regsvr32 /s sys\msscript.ocx +regsvr32 /s sys\TLBINF32.DLL + +:: from {app} +regsvr32 /s scivb2.ocx +regsvr32 /s hexed.ocx +regsvr32 /s IDAClientLib2.dll +regsvr32 /s decLib.dll +regsvr32 /s procLib2.dll +regsvr32 /s spSubclass.dll + +:: {data} +tregsvr.exe -q -t data\VB6.OLB +tregsvr.exe -q -t data\VB32.OLB diff --git a/bin/updater/bin/tregsvr.exe b/bin/updater/bin/tregsvr.exe new file mode 100644 index 0000000..9a1c6dd Binary files /dev/null and b/bin/updater/bin/tregsvr.exe differ diff --git a/bin/updater/scripts/VBDEC.bat b/bin/updater/scripts/VBDEC.bat new file mode 100644 index 0000000..ee24926 --- /dev/null +++ b/bin/updater/scripts/VBDEC.bat @@ -0,0 +1,23 @@ +@ECHO OFF +echo Update VBDEC +cd "updates/VBDEC_Setup" + +:: unpack +echo. +"../../bin/innounp.exe" -x "VBDEC_Setup.exe" + +:: clean +echo. +echo Clean files... +xcopy {app}\*.* /E /I /H +xcopy {sys}\*.* /E /I /H +del "VBDEC_Setup.exe" +rmdir /S /Q {app} +move {sys} sys + +:: copy register script +echo. +echo Remember to run the "VBDEC-register.bat" script before starting the program for the first time! +cp "../../bin/VBDEC-register.bat" VBDEC-register.bat +cp "../../bin/tregsvr.exe" tregsvr.exe + diff --git a/bin/updater/src/Scraper.py b/bin/updater/src/Scraper.py index 948164b..df20d05 100644 --- a/bin/updater/src/Scraper.py +++ b/bin/updater/src/Scraper.py @@ -158,9 +158,12 @@ class Scraper: """ # get http response update_url = self.tool_config.get('update_url', None) - headers = {'User-Agent': self.user_agent} + if not update_url: + raise Exception(colorama.Fore.RED + + f'{self.tool_name}: the update_url field is required for the selected mode') try: + headers = {'User-Agent': self.user_agent} http_response = requests.head(update_url, headers=headers) http_response.raise_for_status() logging.debug(f'{self.tool_name}: HTTP headers fetched, extracting version.') @@ -210,11 +213,11 @@ class Scraper: remote_version = None if 'last-modified' in headers: - logging.info(f'{self.tool_name}: using "last-modified" as version number...') + logging.debug(f'{self.tool_name}: using "last-modified" as version number') input_bytes = headers['last-modified'].encode() remote_version = hashlib.sha1(input_bytes).hexdigest() elif 'content-length' in headers: - logging.info(f'{self.tool_name}: using "content-length" as version number...') + logging.debug(f'{self.tool_name}: using "content-length" as version number') input_bytes = headers['content-length'].encode() remote_version = hashlib.sha1(input_bytes).hexdigest() else: diff --git a/bin/updater/updater.exe b/bin/updater/updater.exe index 16b2056..0b685a7 100644 Binary files a/bin/updater/updater.exe and b/bin/updater/updater.exe differ