Update Hook.cpp

master
xerox 5 years ago
parent b638b914c5
commit 2013335c63

@ -1,5 +1,4 @@
#include "Hook.hpp" #include "Hook.hpp"
#include <iostream>
namespace Hook namespace Hook
{ {
@ -9,10 +8,8 @@ namespace Hook
{ {
//finish the shellcode by adding the address to jmp to //finish the shellcode by adding the address to jmp to
*(uintptr_t*)(jmpCode + OFFSET_TO_ADDRESS) = jmpTo; *(uintptr_t*)(jmpCode + OFFSET_TO_ADDRESS) = jmpTo;
//save old bytes //save old bytes
memcpy(originalBytes, (void*)HookAddress, JMP_CODE_SIZE); memcpy(originalBytes, (void*)HookAddress, JMP_CODE_SIZE);
//install the hook. //install the hook.
InstallHook(); InstallHook();
} }

Loading…
Cancel
Save