minor fixes

This commit is contained in:
Akash Mozumdar 2018-08-23 15:25:33 -04:00
parent 679317b5f5
commit 4310e97236
3 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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; }

View File

@ -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: