Inject into init

This commit is contained in:
Mathieu Strypsteen 2024-03-09 18:58:59 +01:00
parent 0550739418
commit 19f31f08c9

View file

@ -28,7 +28,7 @@ def patch_class(path: str) -> None:
with open(path, "w") as file: with open(path, "w") as file:
matched = False matched = False
for line in lines: for line in lines:
if ".method static constructor <clinit>()V" in line: if ".method public constructor <init>()V" in line:
matched = True matched = True
if matched and "return-void" in line: if matched and "return-void" in line:
file.write("const-string v0, \"frida-gadget\"\n") file.write("const-string v0, \"frida-gadget\"\n")