rename
This commit is contained in:
parent
09552fe7c7
commit
21fd3e1d59
@ -38,5 +38,5 @@ link_libraries(text)
|
|||||||
|
|
||||||
add_subdirectory(GUI)
|
add_subdirectory(GUI)
|
||||||
add_subdirectory(GUI/host)
|
add_subdirectory(GUI/host)
|
||||||
add_subdirectory(vnrhook)
|
add_subdirectory(texthook)
|
||||||
add_subdirectory(extensions)
|
add_subdirectory(extensions)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "host.h"
|
#include "host.h"
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "../vnrhook/texthook.h"
|
#include "../texthook/texthook.h"
|
||||||
|
|
||||||
extern const wchar_t* ALREADY_INJECTED;
|
extern const wchar_t* ALREADY_INJECTED;
|
||||||
extern const wchar_t* ARCHITECTURE_MISMATCH;
|
extern const wchar_t* ARCHITECTURE_MISMATCH;
|
||||||
|
@ -46,9 +46,9 @@ You should then be able to simply open the folder in Visual Studio, and build. R
|
|||||||
|
|
||||||
## Project Architecture
|
## Project Architecture
|
||||||
|
|
||||||
The host (see GUI/host folder) injects vnrhook.dll (created from the vnrhook folder) into the target process and connects to it via 2 pipe files.<br>
|
The host (see GUI/host folder) injects texthook.dll (created from the texthook folder) into the target process and connects to it via 2 pipe files.<br>
|
||||||
Host writes to hostPipe, vnrhook writes to hookPipe.<br>
|
Host writes to hostPipe, texthook writes to hookPipe.<br>
|
||||||
vnrhook waits for the pipe to be connected, then injects a few instructions into any text outputting functions (e.g. TextOut, GetGlyphOutline) that cause their input to be sent through the pipe.<br>
|
texthook waits for the pipe to be connected, then injects a few instructions into any text outputting functions (e.g. TextOut, GetGlyphOutline) that cause their input to be sent through the pipe.<br>
|
||||||
Additional information about hooks is shared through a file view (a.k.a. section object) that is mapped to a reference to the TextHook class.<br>
|
Additional information about hooks is shared through a file view (a.k.a. section object) that is mapped to a reference to the TextHook class.<br>
|
||||||
The text that the host receives through the pipe is then processed a little before being dispatched back to the GUI.<br>
|
The text that the host receives through the pipe is then processed a little before being dispatched back to the GUI.<br>
|
||||||
Finally, the GUI dispatches the text to extensions before displaying it.
|
Finally, the GUI dispatches the text to extensions before displaying it.
|
||||||
|
@ -37,9 +37,9 @@ Textractor 的发行版可以在[这里](https://github.com/Artikash/Textractor/
|
|||||||
|
|
||||||
## 项目架构
|
## 项目架构
|
||||||
|
|
||||||
宿主 (位于 GUI/host 文件夹) 向目标进程注入 vnrhook.dll (由 vnrhook 文件夹创建) 并通过两个管道文件互联.<br>
|
宿主 (位于 GUI/host 文件夹) 向目标进程注入 texthook.dll (由 texthook 文件夹创建) 并通过两个管道文件互联.<br>
|
||||||
宿主向 hostPipe 写入, vnrhook 向 hookPipe 写入.<br>
|
宿主向 hostPipe 写入, texthook 向 hookPipe 写入.<br>
|
||||||
vnrhook 等待管道连接, 之后向一些文本输出函数 (如 TextOut, GetGlyphOutline) 注入一系列指令, 使得它们的输入被沿着管道发送.<br>
|
texthook 等待管道连接, 之后向一些文本输出函数 (如 TextOut, GetGlyphOutline) 注入一系列指令, 使得它们的输入被沿着管道发送.<br>
|
||||||
其它关于钩子的信息通过一个被 TextHook 类保有引用的文件视图 (曾用名: 段对象) 共享.<br>
|
其它关于钩子的信息通过一个被 TextHook 类保有引用的文件视图 (曾用名: 段对象) 共享.<br>
|
||||||
之后, 宿主通过管道接收到的文本在传回 GUI 前被简单处理.<br>
|
之后, 宿主通过管道接收到的文本在传回 GUI 前被简单处理.<br>
|
||||||
最后, GUI 在显示文本前将其分发给扩展.
|
最后, GUI 在显示文本前将其分发给扩展.
|
||||||
|
@ -5,7 +5,7 @@ Set-Location $PSScriptRoot;
|
|||||||
$targets = @(
|
$targets = @(
|
||||||
"Textractor.exe",
|
"Textractor.exe",
|
||||||
"TextractorCLI.exe",
|
"TextractorCLI.exe",
|
||||||
"vnrhook.dll",
|
"texthook.dll",
|
||||||
"Qt5Core.dll",
|
"Qt5Core.dll",
|
||||||
"Qt5Gui.dll",
|
"Qt5Gui.dll",
|
||||||
"Qt5Widgets.dll",
|
"Qt5Widgets.dll",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// vnrhook/const.h
|
// texthook/const.h
|
||||||
// 8/23/2013 jichi
|
// 8/23/2013 jichi
|
||||||
// Branch: ITH/common.h, rev 128
|
// Branch: ITH/common.h, rev 128
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// vnrhook/defs.h
|
// texthook/defs.h
|
||||||
// 8/23/2013 jichi
|
// 8/23/2013 jichi
|
||||||
|
|
||||||
// Pipes
|
// Pipes
|
||||||
@ -23,7 +23,7 @@ constexpr auto PIPE_AVAILABLE_EVENT = L"TEXTRACTOR_PIPE_AVAILABLE";
|
|||||||
|
|
||||||
// Files
|
// Files
|
||||||
|
|
||||||
constexpr auto ITH_DLL = L"vnrhook"; // .dll but LoadLibrary automatically adds that
|
constexpr auto ITH_DLL = L"texthook"; // .dll but LoadLibrary automatically adds that
|
||||||
constexpr auto CONFIG_FILE = u8"Textractor.ini";
|
constexpr auto CONFIG_FILE = u8"Textractor.ini";
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
include_directories(. util)
|
include_directories(. util)
|
||||||
|
|
||||||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||||
set(vnrhook_src
|
set(texthook_src
|
||||||
main.cc
|
main.cc
|
||||||
texthook.cc
|
texthook.cc
|
||||||
engine/match64.cc
|
engine/match64.cc
|
||||||
@ -10,7 +10,7 @@ set(vnrhook_src
|
|||||||
util/util.cc
|
util/util.cc
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
set(vnrhook_src
|
set(texthook_src
|
||||||
main.cc
|
main.cc
|
||||||
texthook.cc
|
texthook.cc
|
||||||
engine/engine.cc
|
engine/engine.cc
|
||||||
@ -23,20 +23,20 @@ set(vnrhook_src
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(vnrhook SHARED ${vnrhook_src})
|
add_library(texthook SHARED ${texthook_src})
|
||||||
|
|
||||||
set_target_properties(vnrhook PROPERTIES
|
set_target_properties(texthook PROPERTIES
|
||||||
LINK_FLAGS "/SUBSYSTEM:WINDOWS /MANIFEST:NO"
|
LINK_FLAGS "/SUBSYSTEM:WINDOWS /MANIFEST:NO"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(vnrhook_libs
|
set(texthook_libs
|
||||||
Version.lib
|
Version.lib
|
||||||
minhook
|
minhook
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(vnrhook ${vnrhook_libs})
|
target_link_libraries(texthook ${texthook_libs})
|
||||||
|
|
||||||
target_compile_definitions(vnrhook
|
target_compile_definitions(texthook
|
||||||
PRIVATE
|
PRIVATE
|
||||||
_CRT_NON_CONFORMING_SWPRINTFS
|
_CRT_NON_CONFORMING_SWPRINTFS
|
||||||
_SCL_SECURE_NO_WARNINGS # config.pri
|
_SCL_SECURE_NO_WARNINGS # config.pri
|
Loading…
Reference in New Issue
Block a user