From 6062b6a7690f36b2c097270f7b1032ce36d1aeae Mon Sep 17 00:00:00 2001 From: anosora233 <86921203+anosora233@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:22:47 +0800 Subject: [PATCH] chore: Verify proxinject existence during init --- mhm/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mhm/config.py b/mhm/config.py index 00b5163..7fb6c70 100644 --- a/mhm/config.py +++ b/mhm/config.py @@ -11,6 +11,7 @@ ROOT = Path(".") CONFIG_PATH = ROOT / "mhmp.json" +PROXIN_PATH = ROOT / "proxinject/proxinjector-cli.exe" LQBIN_RKEY = "res/config/lqc.lqbin" LQBIN_VTXT = ROOT / "lqc.txt" @@ -39,7 +40,9 @@ class Mitmdump: @dataclass class Proxinject: - path: str = str(Path("./proxinject/proxinjector-cli")) + path: str = field( + default_factory=lambda: str(PROXIN_PATH) if PROXIN_PATH.exists() else None + ) args: dict = field( default_factory=lambda: { "name": "jantama_mahjongsoul",