From 1a34c0fdcf485fd25b73685b86f359615d1f8781 Mon Sep 17 00:00:00 2001 From: GameTec_live Date: Thu, 27 Apr 2023 07:04:33 +0200 Subject: [PATCH 1/2] removed chineese --- software/.gitignore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/software/.gitignore b/software/.gitignore index 33cbdb5..2fd4b59 100644 --- a/software/.gitignore +++ b/software/.gitignore @@ -1,6 +1,6 @@ -# 忽略idea的文件夹 +# Ignore the binaries folder bin/ -# 忽略vscode的文件夹 +# Ignore the python library cache script/__pycache__ -# 忽略编译输出文件夹 +# Ignore the compilers output folder src/out \ No newline at end of file From b8347eea914c57e4ec7f0650f4ec7646c6987587 Mon Sep 17 00:00:00 2001 From: GameTec_live Date: Thu, 27 Apr 2023 07:12:27 +0200 Subject: [PATCH 2/2] added linux / unix compatabilty --- software/script/chameleon_cli_unit.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/software/script/chameleon_cli_unit.py b/software/script/chameleon_cli_unit.py index a8f48a4..1a237f3 100644 --- a/software/script/chameleon_cli_unit.py +++ b/software/script/chameleon_cli_unit.py @@ -4,6 +4,7 @@ import subprocess import argparse import colorama import timeit +import sys import chameleon_com import chameleon_cmd @@ -315,7 +316,10 @@ class HFMFNested(ReaderRequiredUint): cmd_param = f"{dist_obj['uid']} {dist_obj['dist']}" for nt_item in nt_obj: cmd_param += f" {nt_item['nt']} {nt_item['nt_enc']} {nt_item['par']}" - cmd_recover = f"nested.exe {cmd_param}" + if sys.platform == "win32": + cmd_recover = f"nested.exe {cmd_param}" + else: + cmd_recover = f"./nested {cmd_param}" # start a decrypt process process = self.sub_process(cmd_recover) @@ -404,7 +408,10 @@ class HFMFDarkside(ReaderRequiredUint): for darkside_item in self.darkside_list: recover_params += f" {darkside_item['nt1']} {darkside_item['ks1']} {darkside_item['par']}" recover_params += f" {darkside_item['nr']} {darkside_item['ar']}" - cmd_recover = f"darkside.exe {recover_params}" + if sys.platform == "win32": + cmd_recover = f"darkside.exe {recover_params}" + else: + cmd_recover = f"./darkside {recover_params}" # subprocess.run(cmd_recover, cwd=os.path.abspath("../bin/"), shell=True) # print(cmd_recover) # start a decrypt process @@ -545,7 +552,10 @@ class HFMFDetectionDecrypt(DeviceRequiredUnit): item1 = rs[j] cmd_base = f"{item0['uid']} {item0['nt']} {item0['nr']} {item0['ar']}" cmd_base += f" {item1['nt']} {item1['nr']} {item1['ar']}" - cmd_recover = f"mfkey32v2.exe {cmd_base}" + if sys.platform == "win32": + cmd_recover = f"mfkey32v2.exe {cmd_base}" + else: + cmd_recover = f"./mfkey32v2 {cmd_base}" # print(cmd_recover) # Found Key: [e899c526c5cd] # subprocess.run(cmd_final, cwd=os.path.abspath("../bin/"), shell=True)