All Projects → MX-Futhark → hook-any-text

MX-Futhark / hook-any-text

Licence: MIT license
The goal of this project is to provide an alternative to well established text hookers, whose features are restrained to a certain number of game engines and emulators.

Programming Languages

java
68154 projects - #9 most used programming language
lua
6591 projects

Projects that are alternatives of or similar to hook-any-text

Iat patcher
Persistent IAT hooking application - based on bearparser
Stars: ✭ 170 (+233.33%)
Mutual labels:  hooking
Game Hacking
Tutorials, tools, and more as related to reverse engineering video games.
Stars: ✭ 2,824 (+5437.25%)
Mutual labels:  cheat-engine
hooking-by-example
A series of increasingly complex programs demonstrating function hooking on 64 bit Windows. Culminating in a program that hooks mspaint to make it always paint orange.
Stars: ✭ 144 (+182.35%)
Mutual labels:  hooking
Corehook
A library that simplifies intercepting application function calls using managed code and the .NET Core runtime
Stars: ✭ 191 (+274.51%)
Mutual labels:  hooking
cheatengine-threadstack-finder
List all thread's base address based on process id
Stars: ✭ 39 (-23.53%)
Mutual labels:  cheat-engine
Open.WinKeyboardHook
A simple and easy-to-use .NET managed wrapper for Low Level Keyboard hooking.
Stars: ✭ 20 (-60.78%)
Mutual labels:  hooking
Frida Ios Hook
A script that helps you trace classes, functions, and modify the return values of methods on iOS platform
Stars: ✭ 151 (+196.08%)
Mutual labels:  hooking
bank mitigations
Anti keylogger, anti screen logger... Strategy to protect with hookings or improve your sandbox with spyware detection... - Demo
Stars: ✭ 17 (-66.67%)
Mutual labels:  hooking
ps2rd
Collection of tools to remotely debug PS2 games
Stars: ✭ 55 (+7.84%)
Mutual labels:  cheat-engine
med
Linux alternative game memory editor
Stars: ✭ 46 (-9.8%)
Mutual labels:  cheat-engine
Anticuckoo
A tool to detect and crash Cuckoo Sandbox
Stars: ✭ 233 (+356.86%)
Mutual labels:  hooking
Funchook
Hook function calls by inserting jump instructions at runtime
Stars: ✭ 253 (+396.08%)
Mutual labels:  hooking
FindTheStupidWindow
Windows API hooking project to log all the windows / UIs with the exact timestamp when they are opened.
Stars: ✭ 13 (-74.51%)
Mutual labels:  hooking
Pine
Dynamic java method hook framework on ART.
Stars: ✭ 171 (+235.29%)
Mutual labels:  hooking
subhook.nim
subhook wrapper for Nim https://github.com/Zeex/subhook
Stars: ✭ 15 (-70.59%)
Mutual labels:  hooking
Pwn Mbr
A simple MBR hijack demonstration
Stars: ✭ 153 (+200%)
Mutual labels:  hooking
DbgChild
Debug Child Process Tool (auto attach)
Stars: ✭ 221 (+333.33%)
Mutual labels:  hooking
RemoteAssistance-JAVA
RemoteControl like TeamViewer(JAVA)
Stars: ✭ 28 (-45.1%)
Mutual labels:  hooking
cheat-and-gin
C++ cheat engine (memory scanner)
Stars: ✭ 101 (+98.04%)
Mutual labels:  cheat-engine
mhook
A Windows API hooking library
Stars: ✭ 167 (+227.45%)
Mutual labels:  hooking

Hook Any Text

HAT is a plugin for Cheat Engine that automatically converts hexadecimal data into readable strings. This project aims at providing a way to hook text when other widely used text hookers fail to do so. Therefore, it might not be as user-friendly as what is expected of such tools, and the result might not be as clean as you would expect. However, you should be able to hook the text of a vast range of games, particularly on emulators.

You are a user

For all downloading and installation instructions, please visit the wiki here: https://github.com/MX-Futhark/hook-any-text/wiki.

You are a developer

You should also visit the wiki first. Once this is done, read LICENSE (TL;DR: MIT License. If you're going to use stuff from this project, feel free to do so but give credit where credit is due.) Then, here are some more stuff for you:

Build instructions

I recommend Eclipse or Netbeans to use with this project.
The entry point of the main program is hextostring.Main. Change command line options as necessary in your run configurations.
The entry point of the test program is hextostring.tests.TestsLauncher. Command line options can be used to restrict the tests to be run.

I would recommend creating the following run configuration for building and testing the project (In Eclipse Mars):

  1. Right click on the project -> Run As -> Maven build...
  2. Type the following content in "Goals": clean install test-compile -DskipTests exec:java -Dexec.mainClass=hextostring.tests.TestsLauncher -Dexec.classpathScope="test"

How it works

selectionConverter.lua is run when Cheat Engine starts. The hooking occurs when a zone in the memory is selected. Changes in the selected zone cause the hexadecimal data to be piped into a process that does the actual conversion and sets the result to the clipboard.

General organization

This project uses Maven and respects the usual conventions of a Maven project.
The Lua file (automatically run when Cheat Engine is started) is placed in src/main/lua.

The conversion is not done directly in lua because:

  • Encoding support in Lua is minimal, therefore the language is not the most fitting for this project.
  • It would be more difficult to organize everything.

Convertion process

The hooking and conversion process can be summarized by the following steps:

  1. A hexadecimal string fed to the Java program is first cleaned of all unnecessary parts, such as sequences of zeroes, and separated into as many clean chunks. Substitutions are made if required by the user.
  2. These chunks are given a mark representing how likely they are to be an actual string.
  3. They are then converted into as many readable strings. Substitutions are made if required by the user.
  4. These strings are also given a mark to judge how likely they are to be natural language.
  5. Strings having received a low mark are eliminated.
  6. Strings deemed valid are cleaned of their formatting clues (for example, markup indicating furigana)
  7. The survivors are concatenated and the result is set to the clipboard.

Tests

A test consists of an input and a corresponding expected, manually written output.
Every input file is converted and compared to the expected output.

Test files are put into the tests directory. Its architecture is as follows:

    tests
    |-sjis (contains tests for games using Shift JIS)
    | |-handmade (contains tests crafted without relying on a game)
    | |-[game1]
    | | |-cmd.txt (contains description of options optimized for this game)
    | | |-input
    | | | |-0001.txt
    | | | |-0002.txt
    | | | |-...
    | | |-expected_output
    | |   |-0001.txt
    | |   |-0002.txt
    | |   |-...
    | |-[game2]
    | |-...
    |-utf16 (contains tests for games using UTF-16)
    | |-[gameA]
    | | |-cmd.txt
    | | |-input
    | | | |-0001.txt
    | | | |-0002.txt
    | | | |-...
    | | |-expected_output
    | |   |-0001.txt
    | |   |-0002.txt
    | |   |-...
    | |-[gameB]
    | |-...
    |-utf16-le (contains tests for games using UTF-16 Little Endian)
    | |-...
    |-utf8 (contains tests for games using UTF-8)
      |-...

The main test class hextostring.tests.TestsLauncher assumes that all .txt files are encoded in UTF-8, without the BOM.

Manual integration testing

It is possible it avoid going through the pain of opening a game in Cheat Engine to test src/main/lua/selectionConverter.lua by running src/test/lua/selectionConverter.lua in a terminal and simulating hex selections through it. More instructions are provided directly in this file.

Note that this shortcut does not replace a full end-to-end test, but it is handy to reduce the error feedback cycle when working on selectionConverter.lua.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].