diff --git a/vnrhook/hijack/texthook.cc b/vnrhook/hijack/texthook.cc index a74189b..38f0229 100644 --- a/vnrhook/hijack/texthook.cc +++ b/vnrhook/hijack/texthook.cc @@ -16,6 +16,7 @@ #include "const.h" #include "ithsys/ithsys.h" #include "disasm/disasm.h" +#include "growl.h" //#include "winseh/winseh.h" //#define ConsoleOutput(...) (void)0 // jichi 9/17/2013: I don't need this >< @@ -317,8 +318,6 @@ DWORD TextHook::UnsafeSend(DWORD dwDataBase, DWORD dwRetn) dwRetn = 0; *(ThreadParam*)pbData = { GetCurrentProcessId(), dwAddr, dwRetn, dwSplit }; - *((DWORD *)pbData + 1) = dwRetn; - *((DWORD *)pbData + 2) = dwSplit; if (dwCount) { DWORD unused; @@ -432,7 +431,7 @@ int TextHook::UnsafeInsertHookCode() } } } - + DWORD old; LPVOID addr = (void*)hp.address; VirtualProtect(addr, sizeof(inst), PAGE_EXECUTE_READWRITE, &old); diff --git a/vnrhook/hijack/texthook.h b/vnrhook/hijack/texthook.h index bd5d3d2..8bdac25 100644 --- a/vnrhook/hijack/texthook.h +++ b/vnrhook/hijack/texthook.h @@ -15,6 +15,7 @@ extern DWORD trigger; // jichi 9/25/2013: This class will be used by NtMapViewOfSectionfor // interprocedure communication, where constructor/destructor will NOT work. + class TextHook { int InsertHookCode(); @@ -25,11 +26,11 @@ class TextHook int RemoveReadCode(); int SetHookName(LPCSTR name); public: + HookParam hp; LPSTR hook_name; int name_length; BYTE recover[0x68 - sizeof(HookParam)]; BYTE original[0x10]; - HookParam hp; unsigned __int64 Address() const { return hp.address; } DWORD Type() const { return hp.type; } diff --git a/vnrhook/pipe.cc b/vnrhook/pipe.cc index ba08cd6..edeb3f4 100644 --- a/vnrhook/pipe.cc +++ b/vnrhook/pipe.cc @@ -65,7 +65,7 @@ void CreatePipe() case HOST_COMMAND_NEW_HOOK: { auto info = *(InsertHookCmd*)buffer; - NewHook(info.hp, info.name); + NewHook(info.hp, info.name, 0); } break; case HOST_COMMAND_REMOVE_HOOK: