add unhook example

This commit is contained in:
rhunk
2023-09-18 00:30:46 +02:00
committed by GitHub
parent 4ea3f979ea
commit 0f720667ee

View File

@@ -142,12 +142,15 @@ module.onSnapActivity = () => {
logInfo("Message constructor " + callback.thisObject)
})
hooker.hook(
val hookerUnhook = hooker.hook(
hooker.findMethod("com.snapchat.client.network_api.NetworkApi$CppProxy", "submit"),
"before",
(callback) => {
logInfo("NetworkApi submit " + callback.arg(0))
}
)
// unhook when needed using this call
hookerUnhook();
}
```