trainerbase 4.7.0__tar.gz → 4.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trainerbase-4.7.0 → trainerbase-4.8.0}/PKG-INFO +3 -3
- {trainerbase-4.7.0 → trainerbase-4.8.0}/pyproject.toml +5 -5
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/injections.py +1 -1
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/memory.py +47 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/scriptengine.py +1 -1
- {trainerbase-4.7.0 → trainerbase-4.8.0}/README.md +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/__init__.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/abc.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/codeinjection.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/common/__init__.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/common/abc.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/common/helpers.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/common/keyboard.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/common/rainbow.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/common/tapper.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/common/teleport.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/config.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gameobject.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/__init__.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/helpers.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/misc.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/objects.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/rainbow.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/scripts.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/speedhack.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/tapper.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/teleport.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/gui/types.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/logger.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/main.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/process.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/py.typed +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/speedhack.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/tts.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/vendor/FASM.EXE +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/vendor/big_logo.png +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/vendor/speedhack32.dll +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/vendor/speedhack64.dll +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.0}/trainerbase/vendor/trainerbase.ico +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trainerbase
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.8.0
|
|
4
4
|
Summary: Framework for creating game trainers/mods
|
|
5
5
|
Author: v01d, doomayka
|
|
6
6
|
Author-email: v01d <v01d@v01d.ru>, doomayka <doomaykaka@gmail.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.14
|
|
10
|
-
Requires-Dist: dearpygui>=2.
|
|
10
|
+
Requires-Dist: dearpygui>=2.2
|
|
11
11
|
Requires-Dist: keyboard>=0.13.5
|
|
12
12
|
Requires-Dist: mouse>=0.7.1
|
|
13
|
-
Requires-Dist: psutil>=7.
|
|
13
|
+
Requires-Dist: psutil>=7.2.2
|
|
14
14
|
Requires-Dist: pydantic>=2.12.5
|
|
15
15
|
Requires-Dist: pymem>=1.14.0
|
|
16
16
|
Requires-Dist: pyttsx3>=2.99
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "trainerbase"
|
|
3
|
-
version = "4.
|
|
3
|
+
version = "4.8.0"
|
|
4
4
|
description = "Framework for creating game trainers/mods"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
authors = [
|
|
@@ -10,10 +10,10 @@ authors = [
|
|
|
10
10
|
requires-python = ">=3.14"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"dearpygui>=2.
|
|
13
|
+
"dearpygui>=2.2",
|
|
14
14
|
"keyboard>=0.13.5",
|
|
15
15
|
"mouse>=0.7.1",
|
|
16
|
-
"psutil>=7.
|
|
16
|
+
"psutil>=7.2.2",
|
|
17
17
|
"pydantic>=2.12.5",
|
|
18
18
|
"pymem>=1.14.0",
|
|
19
19
|
"pyttsx3>=2.99",
|
|
@@ -70,12 +70,12 @@ module-name = "trainerbase"
|
|
|
70
70
|
module-root = ""
|
|
71
71
|
|
|
72
72
|
[build-system]
|
|
73
|
-
requires = ["uv_build>=0.9.
|
|
73
|
+
requires = ["uv_build>=0.10.9,<0.11.0"]
|
|
74
74
|
build-backend = "uv_build"
|
|
75
75
|
|
|
76
76
|
[dependency-groups]
|
|
77
77
|
dev = [
|
|
78
78
|
"invoke>=2.2.1",
|
|
79
79
|
"pyright>=1.1.407",
|
|
80
|
-
"ruff>=0.
|
|
80
|
+
"ruff>=0.15.5",
|
|
81
81
|
]
|
|
@@ -42,7 +42,7 @@ class CodeInjectionUI(AbstractUIComponent):
|
|
|
42
42
|
|
|
43
43
|
try:
|
|
44
44
|
change_codeinjection_state()
|
|
45
|
-
except
|
|
45
|
+
except MemoryReadError, MemoryWriteError, ValueError:
|
|
46
46
|
dpg.set_value(self.dpg_tag, not dpg.get_value(self.dpg_tag))
|
|
47
47
|
print_exc()
|
|
48
48
|
|
|
@@ -15,6 +15,7 @@ from trainerbase.process import pm
|
|
|
15
15
|
|
|
16
16
|
ARCH: Final[int] = 64 if pm.is_64_bit else 32
|
|
17
17
|
POINTER_SIZE: Final[int] = 8 if pm.is_64_bit else 4
|
|
18
|
+
DEFAULT_HARDCODED_ADDRESS_OFFSET_READER: Callable[[int], int] = cast(Callable[[int], int], pm.read_uint)
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
type ConvertibleToAddress = AbstractAddress | int | bytes | str
|
|
@@ -181,6 +182,52 @@ def allocate(size: int = POINTER_SIZE, count: int = 1) -> int:
|
|
|
181
182
|
return pm.allocate(total)
|
|
182
183
|
|
|
183
184
|
|
|
185
|
+
def read_hardcoded_static_address(
|
|
186
|
+
instruction_address: AOBScan,
|
|
187
|
+
*,
|
|
188
|
+
prefix_size: int = 0x3, # Most common value
|
|
189
|
+
instruction_size: int = 0x7, # Most common value
|
|
190
|
+
read_offset: Callable[[int], int] = DEFAULT_HARDCODED_ADDRESS_OFFSET_READER, # uint is most common type
|
|
191
|
+
) -> int:
|
|
192
|
+
"""
|
|
193
|
+
Most common case example
|
|
194
|
+
|
|
195
|
+
Game.exe + 0xD7F91C: db 0x75, 0x16
|
|
196
|
+
|
|
197
|
+
(asm) Game.exe + 0xD7F91E: mov rax, [Game.exe + 0x51B6BD8] <-- hardcoded static address usage
|
|
198
|
+
(bytes) Game.exe + 0xD7F91E: 48 8B 05 B3 72 43 04
|
|
199
|
+
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
|
|
200
|
+
| | |
|
|
201
|
+
| | |__ wanted offset offset
|
|
202
|
+
| |
|
|
203
|
+
| |__ prefix before address usage (3 bytes)
|
|
204
|
+
|
|
|
205
|
+
|__ instruction_address
|
|
206
|
+
|
|
207
|
+
Game.exe + 0xD7F925: mov rcx, [rax + 0x18D8]
|
|
208
|
+
|
|
209
|
+
*(int*)(Game.exe + 0xD7F91E + 0x3) will be 0x44372b3 -- integer offset to wanted address from instruction
|
|
210
|
+
after that one which uses hardcoded address
|
|
211
|
+
|
|
212
|
+
Game.exe + 0x51B6BD8 = Game.exe + 0xD7F91E + 0x7 + 0x44372b3
|
|
213
|
+
^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^
|
|
214
|
+
| | | |
|
|
215
|
+
| | | |__ offset to wanted address
|
|
216
|
+
| | |
|
|
217
|
+
| | |__ instruction size
|
|
218
|
+
| |
|
|
219
|
+
| |__ instruction address
|
|
220
|
+
|
|
|
221
|
+
|__ wanted address
|
|
222
|
+
"""
|
|
223
|
+
|
|
224
|
+
usage_address = instruction_address.resolve()
|
|
225
|
+
offset_in_code = read_offset(usage_address + prefix_size)
|
|
226
|
+
result_pointer = usage_address + instruction_size + offset_in_code
|
|
227
|
+
|
|
228
|
+
return result_pointer
|
|
229
|
+
|
|
230
|
+
|
|
184
231
|
def get_module_address(module_name: str, *, delay: float = 2, retry_limit: int | None = 4) -> int:
|
|
185
232
|
"""
|
|
186
233
|
Returns module address.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|