trainerbase 4.1.0__tar.gz → 4.1.2__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.1.0 → trainerbase-4.1.2}/PKG-INFO +2 -2
- {trainerbase-4.1.0 → trainerbase-4.1.2}/pyproject.toml +2 -2
- trainerbase-4.1.2/trainerbase/config.py +30 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/logger.py +4 -1
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/memory.py +1 -1
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/process.py +4 -4
- trainerbase-4.1.0/trainerbase/config.py +0 -15
- {trainerbase-4.1.0 → trainerbase-4.1.2}/LICENSE +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/README.md +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/__init__.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/abc.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/codeinjection.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/common/__init__.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/common/abc.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/common/helpers.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/common/keyboard.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/common/rainbow.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/common/tapper.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/common/teleport.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gameobject.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/__init__.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/helpers.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/injections.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/misc.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/objects.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/rainbow.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/scripts.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/speedhack.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/tapper.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/teleport.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/gui/types.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/main.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/scriptengine.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/speedhack.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase/tts.py +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase_vendor/FASM.EXE +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase_vendor/speedhack32.dll +0 -0
- {trainerbase-4.1.0 → trainerbase-4.1.2}/trainerbase_vendor/speedhack64.dll +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: trainerbase
|
|
3
|
-
Version: 4.1.
|
|
3
|
+
Version: 4.1.2
|
|
4
4
|
Summary: Framework for creating game trainers/mods
|
|
5
5
|
Home-page: https://gitlab.com/python-trainers/trainer-base
|
|
6
6
|
License: MIT
|
|
@@ -16,7 +16,7 @@ Requires-Dist: keyboard (>=0.13.5,<0.14.0)
|
|
|
16
16
|
Requires-Dist: mouse (>=0.7.1,<0.8.0)
|
|
17
17
|
Requires-Dist: psutil (>=6.1.0,<7.0.0)
|
|
18
18
|
Requires-Dist: pyinjector (>=1.3.0,<2.0.0)
|
|
19
|
-
Requires-Dist: pymem (>=1.
|
|
19
|
+
Requires-Dist: pymem (>=1.14.0,<2.0.0)
|
|
20
20
|
Requires-Dist: pyttsx3 (>=2.98,<3.0)
|
|
21
21
|
Project-URL: Repository, https://gitlab.com/python-trainers/trainer-base
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "trainerbase"
|
|
3
|
-
version = "4.1.
|
|
3
|
+
version = "4.1.2"
|
|
4
4
|
description = "Framework for creating game trainers/mods"
|
|
5
5
|
authors = ["v01d <v01d@v01d.ru>", "doomayka <zd@doomayka.ru>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -48,7 +48,7 @@ line-ending = "lf"
|
|
|
48
48
|
|
|
49
49
|
[tool.poetry.dependencies]
|
|
50
50
|
python = "^3.12"
|
|
51
|
-
pymem = "^1.
|
|
51
|
+
pymem = "^1.14.0"
|
|
52
52
|
keyboard = "^0.13.5"
|
|
53
53
|
pyttsx3 = "^2.98"
|
|
54
54
|
pyinjector = "^1.3.0"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Final
|
|
3
|
+
|
|
4
|
+
from tomllib import load as load_toml
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
CONFIG_FILE: Final[Path] = Path("./trainerbase.toml")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
with CONFIG_FILE.resolve().open("rb") as trainerbase_toml:
|
|
11
|
+
trainerbase_config = load_toml(trainerbase_toml)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
config_warnings = []
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
try:
|
|
18
|
+
process_config = trainerbase_config["process"]
|
|
19
|
+
except KeyError:
|
|
20
|
+
# Legacy section support
|
|
21
|
+
process_config = trainerbase_config["pymem"]
|
|
22
|
+
process_config["names"] = process_config["process_names"]
|
|
23
|
+
del trainerbase_config["pymem"]
|
|
24
|
+
|
|
25
|
+
config_warnings.append(
|
|
26
|
+
"Deprecated config! Use [process] section with field `name` instead of [pymem] with `process_names`"
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
logging_config = trainerbase_config.get("logging")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from logging import ERROR, getLogger
|
|
2
2
|
from logging.config import dictConfig
|
|
3
3
|
|
|
4
|
-
from trainerbase.config import CONFIG_FILE, logging_config
|
|
4
|
+
from trainerbase.config import CONFIG_FILE, config_warnings, logging_config
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
if logging_config is None:
|
|
@@ -38,3 +38,6 @@ logger = getLogger("TrainerBase")
|
|
|
38
38
|
|
|
39
39
|
if using_default_config:
|
|
40
40
|
logger.debug(f"No logging config in {CONFIG_FILE}! Using default one.")
|
|
41
|
+
|
|
42
|
+
for warning_message in config_warnings:
|
|
43
|
+
logger.warning(warning_message)
|
|
@@ -82,7 +82,7 @@ class AOBScan(AbstractAddress):
|
|
|
82
82
|
|
|
83
83
|
find_aob = partial(pattern_scan_module, pm.process_handle, module, return_multiple=return_multiple)
|
|
84
84
|
|
|
85
|
-
scan_result: list[int] | int | None = find_aob(self.aob)
|
|
85
|
+
scan_result: list[int] | int | None = find_aob(self.aob, check_memory_protection=False)
|
|
86
86
|
|
|
87
87
|
if not scan_result:
|
|
88
88
|
raise ValueError(f"AOB not found: {self.aob}")
|
|
@@ -7,7 +7,7 @@ from typing import cast
|
|
|
7
7
|
from psutil import Process, pid_exists, process_iter
|
|
8
8
|
from pymem import Pymem
|
|
9
9
|
|
|
10
|
-
from trainerbase.config import
|
|
10
|
+
from trainerbase.config import process_config
|
|
11
11
|
from trainerbase.logger import logger
|
|
12
12
|
|
|
13
13
|
|
|
@@ -59,9 +59,9 @@ def get_target_pid(process_names: Iterable[str], *, exact_match: bool, ignore_ca
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
def attach_to_process() -> Pymem:
|
|
62
|
-
process_names =
|
|
63
|
-
exact_match =
|
|
64
|
-
ignore_case =
|
|
62
|
+
process_names = process_config["names"]
|
|
63
|
+
exact_match = process_config["exact_match"]
|
|
64
|
+
ignore_case = process_config["ignore_case"]
|
|
65
65
|
|
|
66
66
|
if not process_names:
|
|
67
67
|
raise ValueError("Empty process name list")
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
from typing import Final
|
|
3
|
-
|
|
4
|
-
from tomllib import load as load_toml
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
CONFIG_FILE: Final[Path] = Path("./trainerbase.toml")
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
with CONFIG_FILE.resolve().open("rb") as trainerbase_toml:
|
|
11
|
-
trainerbase_config = load_toml(trainerbase_toml)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
pymem_config = trainerbase_config["pymem"]
|
|
15
|
-
logging_config = trainerbase_config.get("logging")
|
|
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
|