Artikash / Textractor

Extracts text from video games and visual novels. Highly extensible.
GNU General Public License v3.0
2.09k stars 203 forks source link

Textractor cannot hook Guildmaster (Update from injection problem) #100

Closed ZDTL closed 5 years ago

ZDTL commented 5 years ago

https://vndb.org/v23600

When I try hooking it, it just shows:

Textractor: couldn't inject

It seems to be a unity game (if that is of any help).

Edit: I saw this response: https://tinyurl.com/y2jnoe2d The 1.02 update changes it to 64-bit.

Edit2: There's a patch 1.03 uploaded now on their website which allows the game to be 32 bit. TT can now inject it. However, it cannot hook it.

Artikash commented 5 years ago

Could you post the console log from attaching 32 bit version and playing for a bit? Try opening a menu in the game as well.

ZDTL commented 5 years ago

You only want the console log right? If I am not mistaken about it, then it is this:

Textractor: pipe connected Textractor: inserting hook: GetTextExtentPoint32A Textractor: inserting hook: GetTextExtentExPointA Textractor: inserting hook: GetTabbedTextExtentA Textractor: inserting hook: GetCharacterPlacementA Textractor: inserting hook: GetGlyphIndicesA Textractor: inserting hook: GetGlyphOutlineA Textractor: inserting hook: ExtTextOutA Textractor: inserting hook: TextOutA Textractor: inserting hook: TabbedTextOutA Textractor: inserting hook: GetCharABCWidthsA Textractor: inserting hook: GetCharABCWidthsFloatA Textractor: inserting hook: GetCharWidth32A Textractor: inserting hook: GetCharWidthFloatA Textractor: inserting hook: GetTextExtentPoint32W Textractor: inserting hook: GetTextExtentExPointW Textractor: inserting hook: GetTabbedTextExtentW Textractor: inserting hook: GetCharacterPlacementW Textractor: inserting hook: GetGlyphIndicesW Textractor: inserting hook: GetGlyphOutlineW Textractor: inserting hook: ExtTextOutW Textractor: inserting hook: TextOutW Textractor: inserting hook: TabbedTextOutW Textractor: inserting hook: GetCharABCWidthsW Textractor: inserting hook: GetCharABCWidthsFloatW Textractor: inserting hook: GetCharWidth32W Textractor: inserting hook: GetCharWidthFloatW Textractor: inserting hook: DrawTextA Textractor: inserting hook: DrawTextExA Textractor: inserting hook: DrawTextW Textractor: inserting hook: DrawTextExW Textractor: inserting hook: lstrlenA Textractor: inserting hook: lstrcpyA Textractor: inserting hook: lstrcpynA Textractor: inserting hook: lstrlenW Textractor: inserting hook: lstrcpyW Textractor: inserting hook: lstrcpynW Textractor: inserting hook: MultiByteToWideChar Textractor: inserting hook: WideCharToMultiByte Textractor: inserting hook: CharNextA Textractor: inserting hook: CharNextW Textractor: inserting hook: CharPrevA Textractor: inserting hook: CharPrevW Textractor: inserting hook: CharNextExA Textractor: inserting hook: CharPrevExA Textractor: inserting hook: SysAllocString

Also including a screenshot for the threads: https://files.catbox.moe/2cpxi3.png

Artikash commented 5 years ago

Are you attaching this or launching?

ZDTL commented 5 years ago

Attaching.

In case of launching:

Textractor: pipe connected Textractor: inserting hook: GetTextExtentPoint32A Textractor: inserting hook: GetTextExtentExPointA Textractor: inserting hook: GetTabbedTextExtentA Textractor: inserting hook: GetCharacterPlacementA Textractor: inserting hook: GetGlyphIndicesA Textractor: inserting hook: GetGlyphOutlineA Textractor: inserting hook: ExtTextOutA Textractor: inserting hook: TextOutA Textractor: inserting hook: TabbedTextOutA Textractor: inserting hook: GetCharABCWidthsA Textractor: inserting hook: GetCharABCWidthsFloatA Textractor: inserting hook: GetCharWidth32A Textractor: inserting hook: GetCharWidthFloatA Textractor: inserting hook: GetTextExtentPoint32W Textractor: inserting hook: GetTextExtentExPointW Textractor: inserting hook: GetTabbedTextExtentW Textractor: inserting hook: GetCharacterPlacementW Textractor: inserting hook: GetGlyphIndicesW Textractor: inserting hook: GetGlyphOutlineW Textractor: inserting hook: ExtTextOutW Textractor: inserting hook: TextOutW Textractor: inserting hook: TabbedTextOutW Textractor: inserting hook: GetCharABCWidthsW Textractor: inserting hook: GetCharABCWidthsFloatW Textractor: inserting hook: GetCharWidth32W Textractor: inserting hook: GetCharWidthFloatW Textractor: inserting hook: DrawTextA Textractor: inserting hook: DrawTextExA Textractor: inserting hook: DrawTextW Textractor: inserting hook: DrawTextExW Textractor: inserting hook: lstrlenA Textractor: inserting hook: lstrcpyA Textractor: inserting hook: lstrcpynA Textractor: inserting hook: lstrlenW Textractor: inserting hook: lstrcpyW Textractor: inserting hook: lstrcpynW Textractor: inserting hook: MultiByteToWideChar Textractor: inserting hook: WideCharToMultiByte Textractor: inserting hook: CharNextA Textractor: inserting hook: CharNextW Textractor: inserting hook: CharPrevA Textractor: inserting hook: CharPrevW Textractor: inserting hook: CharNextExA Textractor: inserting hook: CharPrevExA Textractor: inserting hook: SysAllocString

Screenshot: https://files.catbox.moe/fccw5y.png (more threads do come up in case of launching. however still not grabbing any text)

Artikash commented 5 years ago

Will be fixed next release.

ZDTL commented 5 years ago

Hi I checked the new release and it still doesn't hook properly. With search function, it gets thread sometimes but they are discontinuous. Is that the problem with the game itself then?

Artikash commented 5 years ago

No, it should just be an issue with detection, not anything with the hook itself. In your GuildMaster_Game_Data folder there should be a folder starting with Mono, could you zip and attach that folder here?

ZDTL commented 5 years ago

MonoBleedingEdge.zip

Artikash commented 5 years ago

Could you post the console log again (from attaching)?

ZDTL commented 5 years ago

So, a new update came out (1.04).

This time a lot many threads came out. However it hooks properly (for now).

Proof: https://files.catbox.moe/arju0h.png

I think I will close the issue for now. Thank you for your help.

MagicPro1994 commented 5 years ago

So, a new update came out (1.04).

This time a lot many threads came out. However it hooks properly (for now).

Proof: https://files.catbox.moe/arju0h.png

I think I will close the issue for now. Thank you for your help.

Which version do you use? x86 or x64?

MagicPro1994 commented 5 years ago

@Artikash It didn't hook well for me. Can you look into the problem for me? I got an error in console: Textractor: Send ERROR (likely an incorrect H-code) GuildMaster_Game_Data.zip

Artikash commented 5 years ago

Could you post your console log when attaching?

TsumiHokiro commented 5 years ago

This game requires a custom hook, which changes with every game restart. We have a way to get it explained in another issue of here if you'd like, see issue #129. The following is the comment with the solution:

Temporary solution via Cheat Engine, to get single-use H-code for Textractor and old ITH. /HW-4@address of System:Char:IsHighSurrogate function as seen in Cheat Engine with activated mono features.

Start the game, open its process in CE, then in newly appeared Mono menu enable Activate mono features setting. Click Memory view button, press Ctrl+G to bring up Goto Address window, paste "System:Char:IsHighSurrogate" without quotes there, press OK or Enter. The address you jump to is our target address for the current run of the game, press Ctrl+G again and it will show up already highlighted in Goto Address window...

type /HW-4@ as the first part of H-code and paste the address from CE after that... and expires when you exit the game.

Note that only Textractor and old versions of ITH (like ITH 2.3) support this H-code...

Originally posted by @Nostaljaded in https://github.com/Artikash/Textractor/issues/129#issuecomment-486477095

Artikash commented 5 years ago

That method should also work, but Textractor should be able to find a correct hook by itself.

TsumiHokiro commented 5 years ago

Textractor x86 4.6.0 Console Log from Connecting to Guildmaster version 1.08:

Textractor: pipe connected Textractor: hijacking process located from 0x00A40000 to 0x00AE1000 vnreng: Mono: INSERT Textractor: inserting hook: mono_string_to_utf8 vnreng: Mono: INSERT Textractor: inserting hook: mono_string_to_utf8_checked vnreng: Mono: INSERT Textractor: inserting hook: mono_string_to_utf16 vnreng: Mono: INSERT Textractor: inserting hook: mono_string_intern vnreng: Mono: INSERT Textractor: inserting hook: mono_string_is_interned vnreng: Mono: INSERT Textractor: inserting hook: mono_marshal_string_to_utf16 vnreng: Mono: INSERT Textractor: inserting hook: mono_string_hash vnreng: Mono: INSERT Textractor: inserting hook: mono_string_chars vnreng: Mono: INSERT Textractor: inserting hook: mono_string_length vnreng: Mono: INSERT Textractor: inserting hook: mono_utf8_from_external vnreng: Mono: INSERT Textractor: inserting hook: mono_string_from_utf16 vnreng: Mono: INSERT Textractor: inserting hook: mono_string_new_utf16 vnreng: Mono: INSERT Textractor: inserting hook: mono_unicode_from_external vnreng: Mono: INSERT Textractor: inserting hook: mono_unicode_to_external vnreng: Mono: INSERT Textractor: inserting hook: mono_string_new vnreng: Mono: INSERT Textractor: inserting hook: mono_string_new_len vnreng: Mono: INSERT Textractor: inserting hook: mono_string_new_wrapper Textractor: inserting hook: string:ToCharArray () {112DD Textractor: inserting hook: string:wstrcpy (char,char, Textractor: inserting hook: string:Format (string,object Textractor: inserting hook: string:Replace (string,strin Textractor: inserting hook: string:ReplaceInternal (stri Textractor: inserting hook: string:ReplaceUnchecked (str Textractor: inserting hook: string:Replace (char,char) { Textractor: inserting hook: string:ReplaceInternal (char Textractor: inserting hook: string:IndexOfUnchecked (cha Textractor: inserting hook: string:op_Equality (string,s Textractor: inserting hook: string:Equals (string,string Textractor: inserting hook: string:EqualsHelper (string, Textractor: inserting hook: string:Compare (string,strin Textractor: inserting hook: string:IsAscii () {13ADD528} Textractor: inserting hook: string:CompareOrdinalIgnoreC Textractor: inserting hook: string:ToLowerInvariant () { Textractor: inserting hook: string:ToLower (System.Globa Textractor: inserting hook: (wrapper managed-to-native) Textractor: inserting hook: (wrapper managed-to-managed) Textractor: inserting hook: string:CreateString (char,in Textractor: inserting hook: string:Format (System.IForma Textractor: inserting hook: string:FormatHelper (System. Textractor: inserting hook: string:ToString () {005A7D58 Textractor: inserting hook: string:Concat (string,string Textractor: inserting hook: string:FillStringChecked (st Textractor: inserting hook: string:IndexOfAny (char[]) { Textractor: inserting hook: string:IndexOfAny (char[],in Textractor: inserting hook: string:IndexOfAnyUnchecked ( Textractor: inserting hook: string:Concat (string,string Textractor: inserting hook: string:IsNullOrWhiteSpace (s Textractor: inserting hook: string:Trim () {13AE3140} + Textractor: inserting hook: string:TrimHelper (int) {13A Textractor: inserting hook: string:CreateTrimmedString ( Textractor: inserting hook: string:Substring (int,int) { Textractor: inserting hook: string:InternalSubString (in Textractor: inserting hook: string:Split (char[]) {13AE2 Textractor: inserting hook: string:SplitInternal (char[] Textractor: inserting hook: string:MakeSeparatorList (ch Textractor: inserting hook: string:InternalSplitKeepEmpt Textractor: inserting hook: string:Substring (int) {13AE Textractor: inserting hook: string:TrimEnd (char[]) {13A Textractor: inserting hook: string:Join (string,string[] Textractor: inserting hook: string:LastIndexOfAny (char[ Textractor: inserting hook: string:LastIndexOfAny (char[ Textractor: inserting hook: string:LastIndexOfAnyUncheck Textractor: inserting hook: string:GetHashCode () {005A7 Textractor: inserting hook: string:CreateStringFromEncod Textractor: inserting hook: string:Equals (string) {005A Textractor: inserting hook: string:Contains (string) {13 Textractor: inserting hook: string:IndexOf (string,Syste Textractor: inserting hook: string:IndexOf (string,int,i Textractor: inserting hook: string:IndexOfUnchecked (str Textractor: inserting hook: string:Concat (string,string Textractor: inserting hook: string:IndexOf (char) {13AE2 Textractor: inserting hook: string:IndexOf (char,int,int Textractor: inserting hook: (wrapper managed-to-managed) Textractor: inserting hook: string:CreateString (char[]) Textractor: inserting hook: string:CtorCharArray (char[] Textractor: inserting hook: string:op_Inequality (string Textractor: inserting hook: string:Concat (object,object Textractor: inserting hook: (wrapper managed-to-managed) Textractor: inserting hook: string:CreateString (char[], Textractor: inserting hook: string:CtorCharArrayStartLen Textractor: inserting hook: string:Format (string,object Textractor: inserting hook: string:StartsWith (string) { Textractor: inserting hook: string:StartsWith (string,Sy Textractor: inserting hook: (wrapper managed-to-managed) Textractor: inserting hook: string:CreateString (char,i Textractor: inserting hook: string:CtorCharPtrStartLengt Textractor: inserting hook: string:CharCopy (char,char* Textractor: inserting hook: string:Format (string,object Textractor: inserting hook: string:EndsWith (string) {13 Textractor: inserting hook: string:EndsWith (string,Syst Textractor: inserting hook: string:IndexOf (string) {13A Textractor: inserting hook: string:Equals (object) {005A Textractor: inserting hook: string:TrimHelper (char[],in Textractor: inserting hook: string:EndsWith (char) {13AE Textractor: inserting hook: string:LastIndexOf (char) {1 Textractor: inserting hook: string:LastIndexOf (char,int Textractor: inserting hook: string:LastIndexOfUnchecked Textractor: inserting hook: string:CopyTo (int,char[],in Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code) Textractor: Send ERROR (likely an incorrect H-code)

As a side note, I'd probably have to delete a few incorrect hooks to get a playable speed with 4.6.0 and 4.6.1.

Artikash commented 5 years ago

Will be fixed next release.

Artikash commented 5 years ago

Fixed in 4.7.0.

Sonotoki-da commented 3 years ago

Another error came out. This time, it's online game, Genshin Impact. I only wanted to play with japanese UI to learn the lang even there ,_, First, I tried out by attaching, but the message is "Couldn't inject". Then I launched game by Textractor, here is log:

Textractor x64 v4.13.0 made by me: Artikash (email: akashmozumdar@gmail.com) Project homepage: https://github.com/Artikash/Textractor Tutorial video: https://tinyurl.com/textractor-tutorial FAQ: https://github.com/Artikash/Textractor/wiki/FAQ Please contact me with any problems, feature requests, or questions relating to Textractor You can do so via the project homepage (issues section) or via email Source code available under GPLv3 at project homepage If you like this project, please tell everyone about it :) Textractor: pipe connected Textractor: hijacking process located from 0x00007FF6B0310000 to 0x00007FF6B0831000 Textractor: inserting hook: GetTextExtentPoint32A Textractor: inserting hook: GetTextExtentExPointA Textractor: inserting hook: GetCharacterPlacementA Textractor: inserting hook: GetGlyphIndicesA Textractor: inserting hook: GetGlyphOutlineA Textractor: inserting hook: ExtTextOutA Textractor: inserting hook: TextOutA Textractor: inserting hook: GetCharABCWidthsA Textractor: inserting hook: GetCharABCWidthsFloatA Textractor: inserting hook: GetCharWidth32A Textractor: inserting hook: GetCharWidthFloatA Textractor: inserting hook: GetTextExtentPoint32W Textractor: inserting hook: GetTextExtentExPointW Textractor: inserting hook: GetCharacterPlacementW Textractor: inserting hook: GetGlyphIndicesW Textractor: inserting hook: GetGlyphOutlineW Textractor: inserting hook: ExtTextOutW Textractor: inserting hook: TextOutW Textractor: inserting hook: GetCharABCWidthsW Textractor: inserting hook: GetCharABCWidthsFloatW Textractor: inserting hook: GetCharWidth32W Textractor: inserting hook: GetCharWidthFloatW Textractor: inserting hook: DrawTextA Textractor: inserting hook: DrawTextExA Textractor: inserting hook: TabbedTextOutA Textractor: inserting hook: GetTabbedTextExtentA Textractor: inserting hook: DrawTextW Textractor: inserting hook: DrawTextExW Textractor: inserting hook: TabbedTextOutW Textractor: inserting hook: GetTabbedTextExtentW Textractor: inserting hook: lstrlenA Textractor: inserting hook: lstrcpyA Textractor: inserting hook: lstrcpynA Textractor: inserting hook: lstrlenW Textractor: inserting hook: lstrcpyW Textractor: inserting hook: lstrcpynW Textractor: inserting hook: MultiByteToWideChar Textractor: inserting hook: WideCharToMultiByte Textractor: inserting hook: GetStringTypeA Textractor: inserting hook: GetStringTypeExA Textractor: removing hook: GetStringTypeA Textractor: inserting hook: FoldStringA Textractor: inserting hook: GetStringTypeW Textractor: inserting hook: GetStringTypeExW Textractor: inserting hook: FoldStringW Textractor: inserting hook: CharNextA Textractor: inserting hook: CharNextW Textractor: inserting hook: CharPrevA Textractor: inserting hook: CharPrevW Textractor: inserting hook: CharNextExA Textractor: inserting hook: CharPrevExA Textractor: inserting hook: SysAllocString Textractor: inserting hook: SysAllocStringLen Textractor: Send ERROR (likely an unstable/incorrect H-code) in ExtTextOutW