changed FromUpperCase to lower_case style.

master
xerox 5 years ago
parent 7b3aab0fa5
commit ad198d7d8b

@ -1,5 +1,5 @@
#include <iostream>
#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;

Loading…
Cancel
Save