forked from Public-Mirror/Textractor
no more auto removing read hooks
This commit is contained in:
parent
3d88f2b9ec
commit
b0eeca5b36
@ -238,31 +238,15 @@ bool TextHook::InsertHookCode()
|
||||
void TextHook::Read()
|
||||
{
|
||||
BYTE buffer[TEXT_BUFFER_SIZE] = {};
|
||||
int changeCount = 0, dataLen = 1;
|
||||
int dataLen = 1;
|
||||
__try
|
||||
{
|
||||
while (WaitForSingleObject(readerEvent, 500) == WAIT_TIMEOUT)
|
||||
{
|
||||
if (memcmp(buffer, location, dataLen) == 0)
|
||||
{
|
||||
changeCount = 0;
|
||||
continue;
|
||||
}
|
||||
if (++changeCount > 10)
|
||||
{
|
||||
ConsoleOutput(GARBAGE_MEMORY);
|
||||
Clear();
|
||||
break;
|
||||
}
|
||||
|
||||
if (int currentLen = HookStrlen((BYTE*)location))
|
||||
while (WaitForSingleObject(readerEvent, 500) == WAIT_TIMEOUT) if (memcmp(buffer, location, dataLen) != 0) if (int currentLen = HookStrlen((BYTE*)location))
|
||||
{
|
||||
dataLen = min(currentLen, TEXT_BUFFER_SIZE);
|
||||
memcpy(buffer, location, dataLen);
|
||||
TextOutput({ GetCurrentProcessId(), address, 0, 0 }, buffer, dataLen);
|
||||
}
|
||||
else changeCount = 0;
|
||||
}
|
||||
}
|
||||
__except (EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user