Fix Some Bugs

master CI_BUILD_42
ColdWindScholar 2023-10-28 22:14:56 +08:00
parent e85c74953b
commit 1f3c5b9530
2 changed files with 7 additions and 7 deletions

View File

@ -9,13 +9,13 @@ Options:
Mode 1 for regular ozip, Mode 2 for CPH1803/CPH1909 [default: 1] Mode 1 for regular ozip, Mode 2 for CPH1803/CPH1909 [default: 1]
""" """
import os
import stat
import shutil
import binascii import binascii
from Crypto.Cipher import AES import os
import shutil
import stat
import zipfile import zipfile
from os.path import basename
from Crypto.Cipher import AES
def main(file_arg): def main(file_arg):
@ -134,7 +134,7 @@ def main(file_arg):
data = rr.read(0x10) data = rr.read(0x10)
if len(data) == 0: if len(data) == 0:
break break
size = 0x10; size = 0x10
if bdsize < 0x10: if bdsize < 0x10:
size = bdsize size = bdsize
dr = ctx.decrypt(data) dr = ctx.decrypt(data)

2
run.py
View File

@ -12,7 +12,7 @@ from configparser import ConfigParser
from io import BytesIO from io import BytesIO
if os.name == 'nt': if os.name == 'nt':
import ctypes import ctypes
ctypes.windll.kernel32.SetConsoleTitlew("TIK4") ctypes.windll.kernel32.SetConsoleTitleW("TIK4")
else: else:
sys.stdout.write("\x1b]2;TIK4\x07") sys.stdout.write("\x1b]2;TIK4\x07")
sys.stdout.flush() sys.stdout.flush()