From ad198d7d8bcf3232ad5a6a9a6683221a3f67c672 Mon Sep 17 00:00:00 2001 From: xerox Date: Thu, 26 Dec 2019 17:21:40 -0800 Subject: [PATCH] changed FromUpperCase to lower_case style. --- main.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index 92ed74f..5b0bee7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,5 @@ #include -#include "Hook.hpp" +#include "hook.hpp" using namespace std; BOOL HookWriteFile( @@ -10,20 +10,23 @@ BOOL HookWriteFile( LPOVERLAPPED lpOverlapped ) { + + //this will change the output to "shithooked!\n" + memset((void *)lpBuffer, NULL, nNumberOfBytesToWrite); - memcpy((void*)lpBuffer, "LOL HACKED?\n", sizeof("LOL HACKED?\n")); - Hook::Disable((uintptr_t)&WriteFile); + memcpy((void*)lpBuffer, "shithooked!?\n", sizeof("shithooked!\n")); + hook::disable(&WriteFile); BOOL result = WriteFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, lpOverlapped); - Hook::Enable((uintptr_t)&WriteFile); + hook::enable(&WriteFile); return result; } int main() { cout << "Hello world" << endl; - Hook::Install( - (uintptr_t) &WriteFile, - (uintptr_t) &HookWriteFile + hook::install( + &WriteFile, + &HookWriteFile ); OFSTRUCT ofstruct;