feat: Add missing cleanup functions various iidx hook modules
Summary: Test Plan:
This commit is contained in:
@@ -64,5 +64,11 @@ static NTSTATUS NTAPI my_RtlMultiByteToUnicodeN(
|
||||
void acp_hook_init(void)
|
||||
{
|
||||
hook_table_apply(NULL, "ntdll.dll", acp_hook_syms, lengthof(acp_hook_syms));
|
||||
log_info("ACP Hook enabled");
|
||||
log_info("Inserted ACP hook");
|
||||
}
|
||||
|
||||
void acp_hook_fini()
|
||||
{
|
||||
hook_table_revert(NULL, "ntdll.dll", acp_hook_syms, lengthof(acp_hook_syms));
|
||||
log_info("Removed ACP hook");
|
||||
}
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
|
||||
void acp_hook_init(void);
|
||||
|
||||
void acp_hook_fini();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -117,6 +117,16 @@ void adapter_hook_init(void)
|
||||
{
|
||||
hook_table_apply(
|
||||
NULL, "iphlpapi.dll", adapter_hook_syms, lengthof(adapter_hook_syms));
|
||||
|
||||
log_info("Inserted adapter hooks");
|
||||
}
|
||||
|
||||
void adapter_hook_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "iphlpapi.dll", adapter_hook_syms, lengthof(adapter_hook_syms));
|
||||
|
||||
log_info("Removed adapter hooks");
|
||||
}
|
||||
|
||||
void adapter_hook_override(const char *adapter_address)
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
*/
|
||||
void adapter_hook_init(void);
|
||||
|
||||
void adapter_hook_fini();
|
||||
|
||||
/**
|
||||
* Uses the provided address to try and match a network adapter.
|
||||
* This adapter is then returned as the only adapter.
|
||||
|
||||
@@ -361,3 +361,14 @@ void hook_setupapi_init(const struct hook_setupapi_data *data)
|
||||
log_info(
|
||||
"Hooked setupapi for %s, %s", data->device_path, data->device_desc);
|
||||
}
|
||||
|
||||
void hook_setupapi_fini()
|
||||
{
|
||||
hook_table_revert(
|
||||
NULL, "setupapi.dll", setupapi_hook_syms, lengthof(setupapi_hook_syms));
|
||||
|
||||
log_info(
|
||||
"Removed hooks setupapi for %s, %s", hook_setupapi_data->device_path, hook_setupapi_data->device_desc);
|
||||
|
||||
hook_setupapi_data = NULL;
|
||||
}
|
||||
@@ -15,4 +15,6 @@ struct hook_setupapi_data {
|
||||
|
||||
void hook_setupapi_init(const struct hook_setupapi_data *data);
|
||||
|
||||
void hook_setupapi_fini();
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user