Update hook.cpp

This commit is contained in:
√(noham)²
2026-05-09 22:11:37 +02:00
parent 544caf14a7
commit 5153c4cad0

View File

@@ -380,16 +380,16 @@ void InstallHooks()
// else
// Log("[+] Hooked mqtt::async_client constructor");
// void* mqttCreateAddr = ResolveExport(mqttCLib, "MQTTAsync_createWithOptions");
void* mqttCreateAddr = ResolveExport(mqttCLib, "MQTTAsync_createWithOptions");
// if (MH_CreateHook(
// mqttCreateAddr,
// &hookedMQTTAsyncCreate,
// reinterpret_cast<void**>(&originalMQTTAsyncCreate)
// ) != MH_OK)
// Log("[ERROR] Failed to hook MQTTAsync_createWithOptions");
// else
// Log("[+] Hooked MQTTAsync_createWithOptions");
if (MH_CreateHook(
mqttCreateAddr,
&hookedMQTTAsyncCreate,
reinterpret_cast<void**>(&originalMQTTAsyncCreate)
) != MH_OK)
Log("[ERROR] Failed to hook MQTTAsync_createWithOptions");
else
Log("[+] Hooked MQTTAsync_createWithOptions");
if (MH_CreateHook(
createRequestAddr,