use bottom 16 bits of ctx (deals with aslr)
This commit is contained in:
parent
26960cf099
commit
4a320a3659
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
project(Textractor)
|
project(Textractor)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
@ -36,5 +36,6 @@ add_subdirectory(texthook)
|
|||||||
add_subdirectory(extensions)
|
add_subdirectory(extensions)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
if (DEFINED VERSION)
|
if (DEFINED VERSION)
|
||||||
add_subdirectory(GUI/host) # uncomment to build CLI
|
add_subdirectory(GUI/host)
|
||||||
endif()
|
endif()
|
||||||
|
#add_subdirectory(GUI/host)
|
||||||
|
@ -530,7 +530,7 @@ namespace
|
|||||||
void ThreadAdded(TextThread& thread)
|
void ThreadAdded(TextThread& thread)
|
||||||
{
|
{
|
||||||
std::wstring threadCode = HookCode::Generate(thread.hp, thread.tp.processId);
|
std::wstring threadCode = HookCode::Generate(thread.hp, thread.tp.processId);
|
||||||
bool savedMatch = savedThreadCtx == thread.tp.ctx && savedThreadCtx2 == thread.tp.ctx2 && savedThreadCode == threadCode;
|
bool savedMatch = (savedThreadCtx & 0xFFFF) == (thread.tp.ctx & 0xFFFF) && savedThreadCtx2 == thread.tp.ctx2 && savedThreadCode == threadCode;
|
||||||
if (savedMatch)
|
if (savedMatch)
|
||||||
{
|
{
|
||||||
savedThreadCtx = savedThreadCtx2 = savedThreadCode[0] = 0;
|
savedThreadCtx = savedThreadCtx2 = savedThreadCode[0] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user