Skip to content
This repository was archived by the owner on Jun 6, 2022. It is now read-only.

Commit 157b950

Browse files
author
Nick
committed
Update README.md
1 parent 97c55c3 commit 157b950

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
11
Java Memory Trainer Library (Windows)
22
=====================================
3+
A simple Java library used to Read and Write Memory from a Windows process, written using the Java Native Access and Google Guava api.
4+
5+
6+
Usage
7+
-----
8+
```java
9+
// Relative memory address inside process
10+
final int MEMORY_ADDRESS = 0x00010ABF;
11+
12+
// Create JTrainer instance for Minesweeper process (window name)
13+
JTrainer jTrainer = new JTrainer(null, "Minesweeper");
14+
15+
// Write 4 bytes as hex 0x90 (nop) to process
16+
jTrainer.writeProcessMemory(MEMORY_ADDRESS, new int[] { 0x90, 0x90, 0x90, 0x90 });
17+
18+
// Read 4 bytes from process and print out result
19+
byte[] bytes = jtrainer.readProcessMemory(MEMORY_ADDRESS, 4);
20+
System.out.println(Arrays.toString(MemoryUtils.convertByteArrayToHex(bytes));
21+
```
322

423
License
524
-------
625
The code in this project is licensed under the Apache
726
Software License 2.0, per the terms of the included LICENSE
827
file.
28+
29+
Dependencies
30+
------------
31+
* Google Guava (13.0.1)
32+
33+
* Java JNA Platform (3.4.0)
34+
35+
* Java JNA (3.3.0)

0 commit comments

Comments
 (0)