ColdWindScholar 2023-10-14 09:28:10 +08:00
parent 097911f157
commit 00314c7bd2
2 changed files with 6 additions and 2 deletions

View File

@ -565,7 +565,9 @@ def main(args):
if args["decrypt"]:
filename = args["<filename>"].replace("\\", "/")
print(f"Extracting {filename}")
if "/" in filename:
if args["outdir"]:
path = args["outdir"]
elif "/" in filename:
path = filename[:filename.rfind("/")]
else:
path = ""

4
run.py
View File

@ -1412,7 +1412,9 @@ def unpack(file, info, project):
print(f"错误!{e}")
zipfile.ZipFile(file.replace('.ozip', '.zip')).extractall(project)
elif info == 'ops':
args = {"decrypt": file}
args = {"decrypt": True,
'<filename>': file,
'outdir': os.path.join(project, os.path.dirname(file).split('.')[0])}
opscrypto.main(args)
elif info == 'payload':
yecho(f"{os.path.basename(file)}所含分区列表:")