trainerbase 4.7.0__tar.gz → 4.8.1__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.1}/PKG-INFO +3 -3
- {trainerbase-4.7.0 → trainerbase-4.8.1}/pyproject.toml +5 -5
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/injections.py +1 -1
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/memory.py +49 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/scriptengine.py +1 -1
- {trainerbase-4.7.0 → trainerbase-4.8.1}/README.md +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/__init__.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/abc.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/codeinjection.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/common/__init__.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/common/abc.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/common/helpers.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/common/keyboard.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/common/rainbow.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/common/tapper.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/common/teleport.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/config.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gameobject.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/__init__.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/helpers.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/misc.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/objects.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/rainbow.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/scripts.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/speedhack.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/tapper.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/teleport.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/gui/types.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/logger.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/main.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/process.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/py.typed +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/speedhack.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/tts.py +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/vendor/FASM.EXE +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/vendor/big_logo.png +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/vendor/speedhack32.dll +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/trainerbase/vendor/speedhack64.dll +0 -0
- {trainerbase-4.7.0 → trainerbase-4.8.1}/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.1
|
|
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.1"
|
|
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.
|
|
73
|
+
requires = ["uv_build>=0.11.3,<1.0.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.9",
|
|
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
|
|
@@ -108,6 +109,8 @@ class AOBScan(AbstractAddress):
|
|
|
108
109
|
module_name=self.module_name,
|
|
109
110
|
multiple_result_index=self.multiple_result_index,
|
|
110
111
|
should_cache=self._should_cache,
|
|
112
|
+
check_memory_protection=self.check_memory_protection,
|
|
113
|
+
should_escape=False,
|
|
111
114
|
)
|
|
112
115
|
|
|
113
116
|
if new_add is not None:
|
|
@@ -181,6 +184,52 @@ def allocate(size: int = POINTER_SIZE, count: int = 1) -> int:
|
|
|
181
184
|
return pm.allocate(total)
|
|
182
185
|
|
|
183
186
|
|
|
187
|
+
def read_hardcoded_static_address(
|
|
188
|
+
instruction_address: AOBScan,
|
|
189
|
+
*,
|
|
190
|
+
prefix_size: int = 0x3, # Most common value
|
|
191
|
+
instruction_size: int = 0x7, # Most common value
|
|
192
|
+
read_offset: Callable[[int], int] = DEFAULT_HARDCODED_ADDRESS_OFFSET_READER, # uint is most common type
|
|
193
|
+
) -> int:
|
|
194
|
+
"""
|
|
195
|
+
Most common case example
|
|
196
|
+
|
|
197
|
+
Game.exe + 0xD7F91C: db 0x75, 0x16
|
|
198
|
+
|
|
199
|
+
(asm) Game.exe + 0xD7F91E: mov rax, [Game.exe + 0x51B6BD8] <-- hardcoded static address usage
|
|
200
|
+
(bytes) Game.exe + 0xD7F91E: 48 8B 05 B3 72 43 04
|
|
201
|
+
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
|
|
202
|
+
| | |
|
|
203
|
+
| | |__ wanted offset offset
|
|
204
|
+
| |
|
|
205
|
+
| |__ prefix before address usage (3 bytes)
|
|
206
|
+
|
|
|
207
|
+
|__ instruction_address
|
|
208
|
+
|
|
209
|
+
Game.exe + 0xD7F925: mov rcx, [rax + 0x18D8]
|
|
210
|
+
|
|
211
|
+
*(int*)(Game.exe + 0xD7F91E + 0x3) will be 0x44372b3 -- integer offset to wanted address from instruction
|
|
212
|
+
after that one which uses hardcoded address
|
|
213
|
+
|
|
214
|
+
Game.exe + 0x51B6BD8 = Game.exe + 0xD7F91E + 0x7 + 0x44372b3
|
|
215
|
+
^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^
|
|
216
|
+
| | | |
|
|
217
|
+
| | | |__ offset to wanted address
|
|
218
|
+
| | |
|
|
219
|
+
| | |__ instruction size
|
|
220
|
+
| |
|
|
221
|
+
| |__ instruction address
|
|
222
|
+
|
|
|
223
|
+
|__ wanted address
|
|
224
|
+
"""
|
|
225
|
+
|
|
226
|
+
usage_address = instruction_address.resolve()
|
|
227
|
+
offset_in_code = read_offset(usage_address + prefix_size)
|
|
228
|
+
result_pointer = usage_address + instruction_size + offset_in_code
|
|
229
|
+
|
|
230
|
+
return result_pointer
|
|
231
|
+
|
|
232
|
+
|
|
184
233
|
def get_module_address(module_name: str, *, delay: float = 2, retry_limit: int | None = 4) -> int:
|
|
185
234
|
"""
|
|
186
235
|
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
|