diff --git a/cyan/tbhtypes/executable.py b/cyan/tbhtypes/executable.py index 312f4e7..1de3643 100644 --- a/cyan/tbhtypes/executable.py +++ b/cyan/tbhtypes/executable.py @@ -76,7 +76,7 @@ class Executable: has_entitlements = True # iirc, injecting doesnt work (sometimes) if the file isn't signed - self.fakesign(False) + self.remove_signature() if any(t.endswith(".appex") for t in tweaks): os.makedirs(PLUGINS_DIR, exist_ok=True) @@ -154,6 +154,9 @@ class Executable: subprocess.run([self.ldid, f"-S{ENT_PATH}", self.path]) print("[*] restored entitlements") + def remove_signature(self) -> None: + subprocess.run([self.ldid, "-R", self.path], stderr=subprocess.DEVNULL) + def fakesign(self, keep_entitlements: bool = True) -> bool: cmd = [self.ldid, "-S"] if keep_entitlements: @@ -195,7 +198,7 @@ class Executable: ) def fix_dependencies(self, tweaks: dict[str, str], need: set[str]) -> None: - self.fakesign() # sometimes it doesnt work if we dont do this + self.remove_signature() for dep in self.get_dependencies(): for cname in (tweaks | self.common): diff --git a/setup.py b/setup.py index aa4e86c..e369b58 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +# type: ignore + from setuptools import setup setup(