Contents
- 1 Sauerbraten Hack (Video)
- 2 GHTools
- 2.0.1 Installing
- 2.0.2 Usage
- 2.0.2.1 Package Overview
- 2.0.2.1.1 GHArchitecture
- 2.0.2.1.2 GHInput
- 2.0.2.1.3 GHMemory
- 2.0.2.1.3.1 boolean openProcess(String windowName)
- 2.0.2.1.3.2 void setArchitecture(GHArchitecture architecture)
- 2.0.2.1.3.3 long getObjectAddress(GHPointer staticMultiLevelPointer)
- 2.0.2.1.3.4 void close()
- 2.0.2.1.3.5 boolean isConnected()
- 2.0.2.1.3.6 boolean readBit(long address, int position)
- 2.0.2.1.3.7 byte readByte(long address)
- 2.0.2.1.3.8 short readShort(long address)
- 2.0.2.1.3.9 char readChar(long address)
- 2.0.2.1.3.10 int readInt(long address)
- 2.0.2.1.3.11 long readLong(long address)
- 2.0.2.1.3.12 float readFloat(long address)
- 2.0.2.1.3.13 double readDouble(long address)
- 2.0.2.1.3.14 readString(long address, int bytestoread)
- 2.0.2.1.3.15 byte[] readByteArray(long address, int bytesToRead)
- 2.0.2.1.3.16 boolean writeBit(boolean data, long address, int position)
- 2.0.2.1.3.17 boolean writeByte(byte data, long address)
- 2.0.2.1.3.18 boolean writeShort(short data, long address)
- 2.0.2.1.3.19 boolean writeChar(char data, long address)
- 2.0.2.1.3.20 boolean writeInt(int data, long address)
- 2.0.2.1.3.21 boolean writeLong(long data, long address)
- 2.0.2.1.3.22 boolean writeFloat(float data, long address)
- 2.0.2.1.3.23 boolean writeDouble(double data, long address)
- 2.0.2.1.3.24 boolean writeString(long address,String string)
- 2.0.2.1.3.25 boolean write(byte[] data, long address)
- 2.0.2.1.4 GHPointer
- 2.0.2.1.5 GHTools
- 2.0.2.1 Package Overview
- 2.0.3 Getting started
- 2.1 Built With
- 2.2 Acknowledgments
Sauerbraten Hack (Video)
This hack is an example on how to use and what you can do with the Game Hacking Library GHTools
It ‘s made to be apprehensible and easy to adapt to other games .
Features
Overlay
The hack makes consumption of JavaFx to overlay things like a menu over the Game .
I used this method because it ‘s bare and can be used on any Game to display a lot of different things.
You can find some examples below .
Godmode
For the Campaign one made a simple Godmod Toggle with the follow features :
- Unlimited Ammo
- Take No Damage
- No Recoil
- Ultra Rapid Fire
- Deal Insane Damage
This is an examaple on how to do basic memory editing like reading and writing from or to memory .
But this besides demonstrates how to change opcodes of the binary in memory at runtime .
Aimbot
Demonstrates how one could implement an Aimbot .
ESP
Demonstrates how one could implement an ESP hack using the GHTools
.
The calculations are specific to OpenGL !
The main point of this was to demonstrate how to draw the ESP Boxes to the JavaFX Overlay .
Rake Mode
Since we are using JavaFX we can display all kinds of stuff to the screen .
To demonstrate this i used this opportunity to honor Rake .
The unharmed hack is object oriented and multi-threaded so one can only make use of the pieces one needs or activate different modes at the lapp Time .
In this example one made a seperate mode that activates the ESP and Aimbot at the same clock time .
Download
If you precisely want to use this hack you can download a pre-compiled jar feasible here .
GHTools
Note: the new repo for the Tools can be found here .
GHTools
is a wrap around JNA makes it easier to use and provides some modern functionality for game hack a well .
Installing
-
To use
GHTools
you can either download it from here and import in in your project . - Or get the source for it here .
If you want to use the source you need to download and import these in your visualize first :
For the JavaFX Overlay make certain to use Java 1.8
or download the current adaptation of JavaFX and spell in in your project from here
Usage
Package Overview
All Classes can be found in the package com.guidedhacking
. In this Overview we will have a brief look at its classes and their most often used methods .
GHArchitecture
Is a arrant Enum type with the following Options :
-
Win32
-
Win64
GHInput
Unlike build in methods these will besides work when the program is out of focus .
Methods:
-
boolean getKeyDown(int key)
returns true
if the key is pressed and false
otherwise .
-
void sendKeyPress(int key)
simulate a fully identify crush and release .
-
void sendKeyDown(int key)
simulate a key crusade .
-
void sendKeyUp(int key)
simulate a key secrete .
-
void SetCursor(int x, int y)
set the position of the cursor to the specified position .
returns an int array whit 2 elements. where the first component is the x-coordinate and the second base respect is the y-coordinate of the cursor .
GHMemory
Used to access the memory of another summons .
Methods:
-
boolean openProcess(String windowName)
Open a manage to the procedure with this window name to be able to access its memory. Returns true
if it was successful and false
otherwise.
-
void setArchitecture(GHArchitecture architecture)
Used to set the computer architecture to the architecture of the crippled to use the chastise pointer size .
-
long getObjectAddress(GHPointer staticMultiLevelPointer)
calculates the runtime address from the static arrow provided .
-
void close()
close the handle you have opened to the game .
-
boolean isConnected()
Checks if the wield to the game is still open. Will return true
if the manage is however open and false
if its closed .
-
boolean readBit(long address, int position)
Used to read a single sting from memory. Return true
if its 1 or false
if its 0 .
-
byte readByte(long address)
Returns the byte that can be found at the provide address in the memory .
-
short readShort(long address)
Returns the short that can be found at the provide address in the memory .
-
char readChar(long address)
Returns the char that can be found at the leave savoir-faire in the memory .
-
int readInt(long address)
Returns the int that can be found at the put up address in the memory .
-
long readLong(long address)
Returns the long that can be found at the provide address in the memory .
-
float readFloat(long address)
Returns the float that can be found at the put up address in the memory .
-
double readDouble(long address)
Returns the duplicate that can be found at the put up address in the memory .
-
readString(long address, int bytestoread)
Returns the string that can be found at the provide address in the memory .
-
byte[] readByteArray(long address, int bytesToRead)
Returns the byte that starts at the provide address with the provide length .
-
boolean writeBit(boolean data, long address, int position)
Write a single bit to memory ( true
for 1 and false
for 0 ) to the specified position in the byte that can be found at the intend cover. Will return
true if successful and false
differently .
-
boolean writeByte(byte data, long address)
Write a unmarried byte to the specified address in memory. Will return
true if successful and false
otherwise .
-
boolean writeShort(short data, long address)
Write a short to the specified address in memory. Will return
true if successful and false
otherwise .
-
boolean writeChar(char data, long address)
Write a individual char to the specified address in memory. Will return
true if successful and false
otherwise .
-
boolean writeInt(int data, long address)
Write an int to the specified savoir-faire in memory. Will return
truthful if successful and false
differently .
-
boolean writeLong(long data, long address)
Write a long to the specified address in memory. Will return
true if successful and false
differently .
-
boolean writeFloat(float data, long address)
Write a float to the specified address in memory. Will return
on-key if successful and false
differently .
-
boolean writeDouble(double data, long address)
Write a duplicate to the specified address in memory. Will return
true if successful and false
otherwise .
-
boolean writeString(long address,String string)
Write a string to the specified address in memory. Will return
true if successful and false
otherwise .
-
boolean write(byte[] data, long address)
Write a byte to memory starting at the supply address. Will return
true if successful and false
otherwise .
this class besides provides some methods for working with objects in memory. If you are interest in them check the source of this class here. Please note that these methods are not tested !
GHPointer
Used to hold information about the electrostatic pointer and the offsets of a value .
Constructor:
-
GHPointer(long staticPointer, int … offsets)
Methods:
-
long getStaticPointer()
-
int[] getOffsets()
GHTools
Methods:
-
boolean sleep(int time)
sleep method acting with exception handeling .
-
int getGamePID()
Returns the serve ID of the presently opened process .
-
boolean isGameVisible()
Return true
if the plot window is visible and false
otherwise .
-
int getGameHeight()
Returns the height of the crippled window in pixels .
-
int getGameWidth()
Returns the width of the game window in pixels .
-
int getGameXPos()
Returns the x-position of the upper left corner of the game window on the sreeen .
-
int getGameYPos()
Returns the y-position of the upper left corner of the game window on the sreeen.
Read more: Status – CnCNet
Getting started
once you have downloaded and imported GHTools into your project you can get begin coding your beginning hack for a bet on .
here is a very childlike model on how to use GHTools
//import everything from the GHTools:
import com.guidedhacking.*;
public class Example {
//create a new pointer with the static address and offsets:
private static GHPointer healthPtr = new GHPointer(0x2DEAD,0x13);
public static void main(String[] args){
//try to open a handle to the game process:
if(GHMemory.openProcess("Game Window Title")) {
//select the architecture of the game:
GHMemory.setArchitecture(GHArchitecture.Win32);
//calculate the runtime address of the health value from the pointer:
long healthAddy = GHMemory.getObjectAddress(healthPtr);
//read the health value from the games memory:
int healthValue = GHMemory.readInt(healthAddy);
//increase the health value by 1:
healthValue++;
//write the new health value back to memory:
GHMemory.writeInt(healthValue,healthAddy);
}else{ //if creating a handle to the game failed
System.out.println("Can not open Game!");
}
}
}
for a more in depth exercise please have a search at the exemplar hack one have provided .
Built With
- JNA – Java Native Access
Acknowledgments
- Rake – for running guidedhacking.com and his great tutorials. Without him this repo would probably not exist.