From 23736478c044681be00b6b380f7bc928347ab25f Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 29 Sep 2018 16:05:08 -0400 Subject: [PATCH] rename --- CMakeLists.txt | 2 +- GUI/CMakeLists.txt | 2 +- GUI/NextHooker.rc | 1 - GUI/{NextHooker.ico => Textractor.ico} | Bin GUI/Textractor.rc | 1 + GUI/host/host.cc | 4 ++-- GUI/main.cpp | 2 +- GUI/mainwindow.cpp | 2 +- GUI/mainwindow.h | 2 +- GUI/mainwindow.ui | 2 +- README.md | 12 ++++++------ deploy.ps1 | 4 ++-- extensions/extensions.h | 12 ++++++------ extensions/googletranslate.cpp | 2 +- vnrhook/engine/engine.cc | 20 ++++++++++---------- vnrhook/hijack/texthook.cc | 14 +++++++------- vnrhook/main.cc | 8 ++++---- vnrhook/pipe.cc | 2 +- vnrhook/util/util.cc | 2 +- 19 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 GUI/NextHooker.rc rename GUI/{NextHooker.ico => Textractor.ico} (100%) create mode 100644 GUI/Textractor.rc diff --git a/CMakeLists.txt b/CMakeLists.txt index fd0206f..3bb83bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) set(MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.cmake/Modules") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${MODULE_DIR}) -project(NextHooker) +project(Textractor) add_compile_options( /std:c++17 diff --git a/GUI/CMakeLists.txt b/GUI/CMakeLists.txt index 5bfa457..56e7944 100644 --- a/GUI/CMakeLists.txt +++ b/GUI/CMakeLists.txt @@ -2,7 +2,7 @@ include(QtUtils) msvc_registry_search() find_qt5(Core Widgets) -set(RESOURCE_FILES NextHooker.rc NextHooker.ico) +set(RESOURCE_FILES Textractor.rc Textractor.ico) add_compile_options(/GL) # Populate a CMake variable with the sources set(gui_SRCS diff --git a/GUI/NextHooker.rc b/GUI/NextHooker.rc deleted file mode 100644 index a848349..0000000 --- a/GUI/NextHooker.rc +++ /dev/null @@ -1 +0,0 @@ -IDI_ICON1 ICON DISCARDABLE "NextHooker.ico" \ No newline at end of file diff --git a/GUI/NextHooker.ico b/GUI/Textractor.ico similarity index 100% rename from GUI/NextHooker.ico rename to GUI/Textractor.ico diff --git a/GUI/Textractor.rc b/GUI/Textractor.rc new file mode 100644 index 0000000..cbdd139 --- /dev/null +++ b/GUI/Textractor.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "Textractor.ico" \ No newline at end of file diff --git a/GUI/host/host.cc b/GUI/host/host.cc index 9a98dd0..ff9c3b8 100644 --- a/GUI/host/host.cc +++ b/GUI/host/host.cc @@ -148,7 +148,7 @@ namespace Host void Close() { - // Artikash 7/25/2018: This is only called when NextHooker is closed, at which point Windows should free everything itself...right? + // Artikash 7/25/2018: This is only called when Textractor is closed, at which point Windows should free everything itself...right? #ifdef _DEBUG // Check memory leaks LOCK(hostMutex); OnRemove = [](TextThread* textThread) { delete textThread; }; @@ -180,7 +180,7 @@ namespace Host IsWow64Process(processHandle, &invalidProcess); if (invalidProcess) { - AddConsoleOutput(L"architecture mismatch: try 32 bit NextHooker instead"); + AddConsoleOutput(L"architecture mismatch: try 32 bit Textractor instead"); CloseHandle(processHandle); return false; } diff --git a/GUI/main.cpp b/GUI/main.cpp index e0cbed3..200f3eb 100644 --- a/GUI/main.cpp +++ b/GUI/main.cpp @@ -16,7 +16,7 @@ LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS* exception) L"Error address: " << (DWORD)exception->ExceptionRecord->ExceptionAddress << std::endl << L"Error in module: " << moduleName << std::endl << L"Additional info: " << exception->ExceptionRecord->ExceptionInformation[1]; - MessageBoxW(NULL, errorMsg.str().c_str(), L"NextHooker ERROR", MB_ICONERROR); + MessageBoxW(NULL, errorMsg.str().c_str(), L"Textractor ERROR", MB_ICONERROR); return EXCEPTION_CONTINUE_SEARCH; } diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index bce07c1..745fe23 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -34,7 +34,7 @@ MainWindow::MainWindow(QWidget *parent) : ); ReloadExtensions(); - Host::AddConsoleOutput(L"NextHooker beta v3.2.1 by Artikash\r\nSource code and more information available under GPLv3 at https://github.com/Artikash/NextHooker"); + Host::AddConsoleOutput(L"Textractor beta v3.2.1 by Artikash\r\nSource code and more information available under GPLv3 at https://github.com/Artikash/Textractor"); } MainWindow::~MainWindow() diff --git a/GUI/mainwindow.h b/GUI/mainwindow.h index 96e8d52..ffa3313 100644 --- a/GUI/mainwindow.h +++ b/GUI/mainwindow.h @@ -52,7 +52,7 @@ private: QVector GetAllHooks(DWORD processId); Ui::MainWindow* ui; - QSettings settings = QSettings("NextHooker.ini", QSettings::IniFormat); + QSettings settings = QSettings("Textractor.ini", QSettings::IniFormat); QComboBox* processCombo; QComboBox* ttCombo; QComboBox* extenCombo; diff --git a/GUI/mainwindow.ui b/GUI/mainwindow.ui index 7729192..c519296 100644 --- a/GUI/mainwindow.ui +++ b/GUI/mainwindow.ui @@ -17,7 +17,7 @@ - NextHooker + Textractor QObject diff --git a/README.md b/README.md index 8975425..0ee38ef 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# NextHooker +# Textractor ## Overview -*NextHooker* is an open-source x86/x64 text hooker for Windows. +*Textractor* is an open-source x86/x64 text hooker for Windows. ![How it looks](https://media.discordapp.net/attachments/330538905072041994/486629608456847360/unknown.png?width=1083&height=353) @@ -12,7 +12,7 @@ Basically, GUI text hooker based on [Stomp](http://www.hongfire.com/forum/showth ## Downloads -Releases of NextHooker can be found [here](https://github.com/Artikash/NextHooker/releases) +Releases of Textractor can be found [here](https://github.com/Artikash/Textractor/releases) Previous releases of ITHVNR can be found [here](https://github.com/mireado/ITHVNR/releases). @@ -32,8 +32,8 @@ See the extensions folder and my [Extensions project](https://github.com/Artikas ## Compiling -Before compiling *NextHooker*, you should get Visual Studio with CMake and ATL support, as well as Qt version 5.11
-You should then be able to simply open the folder in Visual Studio, and build. Run Build/NextHooker.exe +Before compiling *Textractor*, you should get Visual Studio with CMake and ATL support, as well as Qt version 5.11
+You should then be able to simply open the folder in Visual Studio, and build. Run Build/Textractor.exe ## Project Architecture @@ -54,7 +54,7 @@ GPL v3 ## Developers -- NextHooker creation/updating by [Me](https://github.com/Artikash) and [DoumanAsh](https://github.com/DoumanAsh) +- Textractor creation/updating by [Me](https://github.com/Artikash) and [DoumanAsh](https://github.com/DoumanAsh) - ITHVNR updating by [mireado](https://github.com/mireado) and [Eguni](https://github.com/Eguni) - ITHVNR new GUI & VNR engine migration by [Stomp](http://www.hongfire.com/forum/member/325894-stomp) - VNR engine making by [jichi](https://archive.is/prJwr) diff --git a/deploy.ps1 b/deploy.ps1 index 97f710b..67ad97f 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,4 +1,4 @@ cd Builds/x86-Release/Build; -Compress-Archive -Force -Path "NextHooker.exe","styles","platforms","Qt5Core.dll","Qt5Gui.dll","Qt5Widgets.dll","vnrhook.dll","1_Remove Repetition.dll","2_Copy to Clipboard.dll","3_Google Translate.dll","4_Extra Newlines.dll" -DestinationPath NextHooker; +Compress-Archive -Force -Path "Textractor.exe","styles","platforms","Qt5Core.dll","Qt5Gui.dll","Qt5Widgets.dll","vnrhook.dll","1_Remove Repetition.dll","2_Copy to Clipboard.dll","3_Google Translate.dll","4_Extra Newlines.dll" -DestinationPath Textractor; cd ../../x64-Release/Build; -Compress-Archive -Force -Path "NextHooker.exe","styles","platforms","Qt5Core.dll","Qt5Gui.dll","Qt5Widgets.dll","vnrhook.dll","1_Remove Repetition.dll","2_Copy to Clipboard.dll","3_Google Translate.dll","4_Extra Newlines.dll" -DestinationPath NextHooker; +Compress-Archive -Force -Path "Textractor.exe","styles","platforms","Qt5Core.dll","Qt5Gui.dll","Qt5Widgets.dll","vnrhook.dll","1_Remove Repetition.dll","2_Copy to Clipboard.dll","3_Google Translate.dll","4_Extra Newlines.dll" -DestinationPath Textractor; diff --git a/extensions/extensions.h b/extensions/extensions.h index 6231d42..5574590 100644 --- a/extensions/extensions.h +++ b/extensions/extensions.h @@ -27,13 +27,13 @@ bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo); /** * You shouldn't mess with this or even look at it unless you're certain you know what you're doing. - * Param sentence: pointer to sentence received by NextHooker (UTF-16). - * You should not modify this sentence. If you want NextHooker to receive a modified sentence, copy it into your own buffer and return that. - * Please allocate the buffer using malloc() and not new[] or something else: NextHooker uses free() to free it. + * Param sentence: pointer to sentence received by Textractor (UTF-16). + * You should not modify this sentence. If you want Textractor to receive a modified sentence, copy it into your own buffer and return that. + * Please allocate the buffer using malloc() and not new[] or something else: Textractor uses free() to free it. * Param miscInfo: pointer to start of singly linked list containing misc info about the sentence. - * Return value: pointer to sentence NextHooker takes for future processing and display. + * Return value: pointer to sentence Textractor takes for future processing and display. * Return 'sentence' unless you created a new sentence/buffer as mentioned above. - * NextHooker will display the sentence after all extensions have had a chance to process and/or modify it. + * Textractor will display the sentence after all extensions have had a chance to process and/or modify it. * THIS FUNCTION MAY BE RUN SEVERAL TIMES CONCURRENTLY: PLEASE ENSURE THAT IT IS THREAD SAFE! */ extern "C" __declspec(dllexport) const wchar_t* OnNewSentence(const wchar_t* sentenceArr, const InfoForExtension* miscInfo) @@ -41,7 +41,7 @@ extern "C" __declspec(dllexport) const wchar_t* OnNewSentence(const wchar_t* sen std::wstring sentence(sentenceArr); if (ProcessSentence(sentence, SentenceInfo{ miscInfo })) { - // No need to worry about freeing this: NextHooker does it for you. + // No need to worry about freeing this: Textractor does it for you. wchar_t* newSentence = (wchar_t*)malloc((sentence.size() + 1) * sizeof(wchar_t*)); wcscpy_s(newSentence, sentence.size() + 1, sentence.c_str()); return newSentence; diff --git a/extensions/googletranslate.cpp b/extensions/googletranslate.cpp index 2392bf1..a405196 100644 --- a/extensions/googletranslate.cpp +++ b/extensions/googletranslate.cpp @@ -41,7 +41,7 @@ std::wstring GetTranslationUri(const wchar_t* text, unsigned int TKK) bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo) { static HINTERNET internet = NULL; - if (!internet) internet = WinHttpOpen(L"Mozilla/5.0 NextHooker", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, NULL, NULL, 0); + if (!internet) internet = WinHttpOpen(L"Mozilla/5.0 Textractor", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, NULL, NULL, 0); static unsigned int TKK = 0; std::wstring translation; diff --git a/vnrhook/engine/engine.cc b/vnrhook/engine/engine.cc index 47d8b5e..acc8123 100644 --- a/vnrhook/engine/engine.cc +++ b/vnrhook/engine/engine.cc @@ -56,7 +56,7 @@ namespace { // unnamed helpers hp.type = DIRECT_READ; if (funcAddr == funcW) hp.type |= USING_UNICODE; hp.address = addr; - ConsoleOutput("NextHooker: triggered: adding dynamic reader"); + ConsoleOutput("Textractor: triggered: adding dynamic reader"); NewHook(hp, "READ"); ret = true; } @@ -2125,7 +2125,7 @@ bool InsertBaldrHook() const BYTE ins[] = { 0x90,0xff,0x50,0x3c,0x83,0xc4,0x20,0x8b,0x45,0xec }; DWORD addr = Util::SearchMemory(ins, sizeof(ins)); if (!addr) { - ConsoleOutput("NextHooker: BALDR failed: could not find instructions"); + ConsoleOutput("Textractor: BALDR failed: could not find instructions"); return false; } @@ -2133,7 +2133,7 @@ bool InsertBaldrHook() hp.address = addr; hp.offset = 4; hp.type = NO_CONTEXT | USING_STRING | USING_UNICODE; // 0x403 - ConsoleOutput("NextHooker: INSERT BALDR"); + ConsoleOutput("Textractor: INSERT BALDR"); NewHook(hp, "BALDR"); return true; @@ -5785,7 +5785,7 @@ bool InsertShinaHook() if (ver >= 50) { SwitchTrigger(true); trigger_fun_ = StackSearchingTrigger; - ConsoleOutput("NextHooker: ShinaRio 2.50+: adding trigger"); + ConsoleOutput("Textractor: ShinaRio 2.50+: adding trigger"); return true; } else if (ver >= 48) { // v2.48, v2.49 @@ -7768,7 +7768,7 @@ bool InsertQLIE3Hook() }; ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress); if (!addr) { - ConsoleOutput("NextHooker:QLIE3: pattern not found"); + ConsoleOutput("Textractor:QLIE3: pattern not found"); //ConsoleOutput("Not QLIE2"); return false; } @@ -7780,7 +7780,7 @@ bool InsertQLIE3Hook() hp.split = pusha_edi_off - 4; hp.address = addr; - ConsoleOutput("NextHooker: INSERT QLIE3"); + ConsoleOutput("Textractor: INSERT QLIE3"); NewHook(hp, "QLiE3"); //ConsoleOutput("QLIE2"); return true; @@ -9342,7 +9342,7 @@ static bool InsertNewWillPlusHook() hp.type = USING_STRING | USING_UNICODE | DATA_INDIRECT; hp.offset = pusha_ecx_off - 4; hp.index = 0; - ConsoleOutput("NextHooker: INSERT New WillPlus (ADVHD) hook"); + ConsoleOutput("Textractor: INSERT New WillPlus (ADVHD) hook"); NewHook(hp, "WillPlus2"); return true; } @@ -16130,7 +16130,7 @@ bool InsertAIRNovelHook() DWORD addr = MemDbg::findBytes(bytes, sizeof(bytes), base, base + 0x200000); // Artikash 7/14/2018: Probably big enough if (!addr) { - ConsoleOutput("NextHooker: AIRNovel: pattern not found"); + ConsoleOutput("Textractor: AIRNovel: pattern not found"); return false; } HookParam hp = {}; @@ -16153,7 +16153,7 @@ bool InsertAIRNovelHook() // memcmp((char*)str, "app:/", 5); //}; - ConsoleOutput("NextHooker: INSERT AIRNovel"); + ConsoleOutput("Textractor: INSERT AIRNovel"); NewHook(hp, "AIRNovel"); return true; } @@ -16434,7 +16434,7 @@ bool InsertRenpyHook() hp.address = (DWORD)GetProcAddress(GetModuleHandleW(L"python27"), "PyUnicodeUCS2_Format"); if (!hp.address) { - ConsoleOutput("NextHooker: Ren'py failed: failed to find python27.dll or PyUnicodeUCS2_Format"); + ConsoleOutput("Textractor: Ren'py failed: failed to find python27.dll or PyUnicodeUCS2_Format"); return false; } hp.offset = 4; diff --git a/vnrhook/hijack/texthook.cc b/vnrhook/hijack/texthook.cc index 7e17842..4ab5d6a 100644 --- a/vnrhook/hijack/texthook.cc +++ b/vnrhook/hijack/texthook.cc @@ -257,7 +257,7 @@ bool TextHook::UnsafeInsertHookCode() if (hp.module && (hp.type & MODULE_OFFSET)) // Map hook offset to real address. { if (DWORD base = GetModuleBase(hp.module)) hp.address += base; - else return ConsoleOutput("NextHooker: UnsafeInsertHookCode: FAILED: module not present"), false; + else return ConsoleOutput("Textractor: UnsafeInsertHookCode: FAILED: module not present"), false; hp.type &= ~MODULE_OFFSET; } @@ -271,7 +271,7 @@ bool TextHook::UnsafeInsertHookCode() } else { - ConsoleOutput(("NextHooker: UnsafeInsertHookCode: FAILED: error " + std::string(MH_StatusToString(err))).c_str()); + ConsoleOutput(("Textractor: UnsafeInsertHookCode: FAILED: error " + std::string(MH_StatusToString(err))).c_str()); return false; } @@ -310,13 +310,13 @@ DWORD WINAPI ReaderThread(LPVOID hookPtr) { if (!IthGetMemoryRange((void*)hook->hp.address, nullptr, nullptr)) { - ConsoleOutput("NextHooker: can't read desired address"); + ConsoleOutput("Textractor: can't read desired address"); break; } if (hook->hp.type & DATA_INDIRECT) currentAddress = *((char**)hook->hp.address + hook->hp.index); if (!IthGetMemoryRange(currentAddress, nullptr, nullptr)) { - ConsoleOutput("NextHooker: can't read desired address"); + ConsoleOutput("Textractor: can't read desired address"); break; } Sleep(500); @@ -327,7 +327,7 @@ DWORD WINAPI ReaderThread(LPVOID hookPtr) } if (++changeCount > 10) { - ConsoleOutput("NextHooker: memory constantly changing, useless to read"); + ConsoleOutput("Textractor: memory constantly changing, useless to read"); break; } @@ -341,7 +341,7 @@ DWORD WINAPI ReaderThread(LPVOID hookPtr) DWORD unused; WriteFile(::hookPipe, buffer, dataLen + sizeof(ThreadParam), &unused, nullptr); } - ConsoleOutput("NextHooker: remove read code"); + ConsoleOutput("Textractor: remove read code"); hook->ClearHook(); return 0; } @@ -377,7 +377,7 @@ void TextHook::RemoveReadCode() void TextHook::ClearHook() { WaitForSingleObject(hmMutex, 0); - if (hook_name) ConsoleOutput(("NextHooker: removing hook: " + std::string(hook_name)).c_str()); + if (hook_name) ConsoleOutput(("Textractor: removing hook: " + std::string(hook_name)).c_str()); if (hp.type & DIRECT_READ) RemoveReadCode(); else RemoveHookCode(); NotifyHookRemove(hp.address); diff --git a/vnrhook/main.cc b/vnrhook/main.cc index 6985c78..d12140c 100644 --- a/vnrhook/main.cc +++ b/vnrhook/main.cc @@ -70,14 +70,14 @@ void NewHook(const HookParam &hp, LPCSTR lpname, DWORD flag) if (++currentHook < MAX_HOOK) { if (name[0] == '\0') name = "UserHook" + std::to_string(userhookCount++); - ConsoleOutput(("NextHooker: try inserting hook: " + name).c_str()); + ConsoleOutput(("Textractor: try inserting hook: " + name).c_str()); // jichi 7/13/2014: This function would raise when too many hooks added ::hookman[currentHook].InitHook(hp, name.c_str(), flag); - if (::hookman[currentHook].InsertHook()) ConsoleOutput(("NextHooker: inserted hook: " + name).c_str()); - else ConsoleOutput("NextHooker:WARNING: failed to insert hook"); + if (::hookman[currentHook].InsertHook()) ConsoleOutput(("Textractor: inserted hook: " + name).c_str()); + else ConsoleOutput("Textractor:WARNING: failed to insert hook"); } - else ConsoleOutput("NextHooker: too many hooks: can't insert"); + else ConsoleOutput("Textractor: too many hooks: can't insert"); } void RemoveHook(uint64_t addr) diff --git a/vnrhook/pipe.cc b/vnrhook/pipe.cc index c52e6b6..766b64e 100644 --- a/vnrhook/pipe.cc +++ b/vnrhook/pipe.cc @@ -48,7 +48,7 @@ void CreatePipe() *(DWORD*)buffer = GetCurrentProcessId(); WriteFile(::hookPipe, buffer, sizeof(DWORD), &count, nullptr); - ConsoleOutput("NextHooker: pipe connected"); + ConsoleOutput("Textractor: pipe connected"); #ifdef _WIN64 ConsoleOutput("Hooks don't work on x64, only read codes work. Engine disabled."); #else diff --git a/vnrhook/util/util.cc b/vnrhook/util/util.cc index 4ada7fb..7782a16 100644 --- a/vnrhook/util/util.cc +++ b/vnrhook/util/util.cc @@ -297,7 +297,7 @@ namespace } __except (1) { - ConsoleOutput("NextHooker: SearchMemory ERROR (NextHooker will likely still work fine, but please let Artikash know if this happens a lot!)"); + ConsoleOutput("Textractor: SearchMemory ERROR (Textractor will likely still work fine, but please let Artikash know if this happens a lot!)"); return 0; } return 0;