remove overly defensive programming (that doesnt even work)

This commit is contained in:
Akash Mozumdar 2018-08-28 15:18:05 -04:00
parent 41f80622cb
commit 79bcc7d6e1
2 changed files with 1 additions and 6 deletions

View File

@ -17,6 +17,5 @@
// Mutex
#define ITH_HOOKMAN_MUTEX_ L"VNR_HOOKMAN_" // ITH_HOOKMAN_%d
#define ITH_GRANTPIPE_MUTEX L"VNR_GRANT_PIPE" // ITH_GRANT_PIPE
// EOF

View File

@ -28,8 +28,7 @@ void CreatePipe()
{
DWORD count = 0;
BYTE buffer[PIPE_BUFFER_SIZE] = {};
HANDLE hostPipe = ::hookPipe = INVALID_HANDLE_VALUE,
pipeAcquisitionMutex = CreateMutexW(nullptr, TRUE, ITH_GRANTPIPE_MUTEX);
HANDLE hostPipe = ::hookPipe = INVALID_HANDLE_VALUE;
while (::hookPipe == INVALID_HANDLE_VALUE || hostPipe == INVALID_HANDLE_VALUE)
{
@ -49,9 +48,6 @@ void CreatePipe()
*(DWORD*)buffer = GetCurrentProcessId();
WriteFile(::hookPipe, buffer, sizeof(DWORD), &count, nullptr);
ReleaseMutex(pipeAcquisitionMutex);
CloseHandle(pipeAcquisitionMutex);
ConsoleOutput("NextHooker: pipe connected");
#ifdef _WIN64
ConsoleOutput("Hooks don't work on x64, only read codes work. Engine disabled.");