Splatlogger 1.6__tar.gz → 1.6.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Splatlogger
3
- Version: 1.6
3
+ Version: 1.6.2
4
4
  Summary: A CLI PID (Principal ID)/PNID grabber and match logger for Splatoon.
5
5
  Author-email: Shadow Doggo <shadowdoggo@protonmail.com>
6
6
  License-Expression: MIT
@@ -18,36 +18,44 @@ Requires-Dist: pymemoryeditor
18
18
  A CLI PID (Principal ID)/PNID grabber and match logger for Splatoon, written in Python.
19
19
 
20
20
  ## Prerequisites
21
- To install the package, you'll need to have Python 3.11 or newer installed on your system
22
- (on Android devices you can use Termux).
21
+ To install the package, you'll need to have Python 3.11 or newer installed on your system.
22
+ On Android devices you can use Termux.
23
23
  Python is not required for the Windows executable.
24
24
 
25
25
  Both the Wii U and Cemu (Windows and Linux only) are supported.
26
26
 
27
- Your Wii U will need to have either the Tiramisu or Aroma environment set up or have another way to run homebrew
28
- (e.g. Haxchi, browser exploit).
27
+ Your Wii U will need to have either the Tiramisu or Aroma environment set up or have another way to run homebrew,
28
+ such as Haxchi or the browser exploit.
29
29
 
30
- On Tiramisu, use [TCPGecko](https://github.com/BullyWiiPlaza/tcpgecko) (Geckiine or SDGeckiine will work as well).
30
+ On Tiramisu, use [TCPGecko](https://github.com/BullyWiiPlaza/tcpgecko), [Geckiine](https://hb-app.store/wiiu/geckiine),
31
+ or any other app with the TCPGecko server.
31
32
 
32
33
  On Aroma, install the [TCPGecko Aroma plugin](https://codeberg.org/ShadowDoggo/TCPGeckoAroma).
33
34
 
34
35
  ## Installation
36
+ On Windows, you can use the executable provided on the releases page.
37
+ Though if you already have Python installed, it's recommended to use the package.
38
+
35
39
  To install the package from PyPI, run:
36
40
  ```
37
- python -m pip install Splatlogger
41
+ pip install Splatlogger
38
42
  ```
39
43
 
40
- Or download the latest release from GitHub and run:
44
+ Or download the latest release from Codeberg and run:
41
45
  ```
42
- python -m pip install /path/to/Splatlogger-1.x.zip
46
+ pip install path/to/Splatlogger-v1.x.zip
43
47
  ```
44
48
 
45
- On Windows, use the executable provided on the releases page.
46
- Though if you already have Python installed, it's recommended to use the package.
49
+ If you do have Python installed but do not wish to install the package, you can run the module directly from the source code.
50
+
51
+ Install the required dependencies:
52
+ ```
53
+ cd path/to/Splatlogger-v1.x/ && pip install -r requirements.txt
54
+ ```
47
55
 
48
- If you do have Python installed but do not wish to install the package, you can run the module directly from the source code:
56
+ Then run the module:
49
57
  ```
50
- cd /path/to/Splatlogger-1.x/src && python -m splatlogger
58
+ cd src/ && python -m splatlogger
51
59
  ```
52
60
 
53
61
  ## Usage
@@ -60,7 +68,7 @@ where `IP` is your Wii U's LAN IP address
60
68
 
61
69
  If using the Windows executable, run:
62
70
  ```
63
- /path/to/Splatlogger-1.x.exe -ip IP [options]
71
+ path/to/Splatlogger-1.x.exe -ip IP [options]
64
72
  ```
65
73
 
66
74
  Options:
@@ -70,26 +78,27 @@ Options:
70
78
  - `extended` - Log all player information and additional match information.
71
79
  - `stats` - Same as above with the addition of player stats (points, K/D). Requires the match to end to finish logging.
72
80
 
73
- - `-auto [option]` - Enable auto logging. When enabled will automatically log every match you play (log level must be at least `standard`).
81
+ - `-auto [option]` - Enable auto logging. When enabled will automatically log every match you play. The log level must be at least `standard`.
74
82
  - `all` - Save a log of all matches you play (default).
75
83
  - `latest` - Save a log of only the latest match.
76
84
 
77
85
  - `-aroma` - Switch to Aroma mode. Enable if using the TCPGecko Aroma plugin.
78
86
 
79
87
  - `-cemu [PID]` - Switch to Cemu mode. The `-ip` argument is not required and will be ignored.
88
+ *Note: If you have ptrace protection enabled, you'll need to run python as root. It's best to run the module from source in that case.*
80
89
  - `PID` - PID of the Cemu process (optional).
81
90
 
82
- - `-stack Address (in hex)` - (Cemu only) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
83
- Reuired for logging stats, not needed otherwise.
91
+ - `-stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
92
+ Only required for logging stats. If the default values don't work, you'll need to specify this manually.
84
93
 
85
94
  <img src="stack.png" width="600" alt="(example)">
86
95
 
87
96
  - `-silent` - Disable printing logs to the console.
88
97
 
89
- Logs are saved in `/[User]/Documents/Splatlogger/logs/[Date]`.
98
+ Logs are saved in `(User)/Documents/Splatlogger/logs/(Date)/`.
90
99
 
91
100
  To always run with the same IP and options without having to type them in manually, create an `args.txt` file in
92
- `/[User]/Documents/Splatlogger` and put the arguments following `splatlogger` in there.
101
+ `(User)/Documents/Splatlogger/` and put the arguments following `splatlogger` in there.
93
102
  Afterward any arguments passed through the command line will be ignored.
94
103
 
95
104
  Only one program can be connected to TCPGecko at a time. If you have something else connected, disconnect it beforehand.
@@ -2,36 +2,44 @@
2
2
  A CLI PID (Principal ID)/PNID grabber and match logger for Splatoon, written in Python.
3
3
 
4
4
  ## Prerequisites
5
- To install the package, you'll need to have Python 3.11 or newer installed on your system
6
- (on Android devices you can use Termux).
5
+ To install the package, you'll need to have Python 3.11 or newer installed on your system.
6
+ On Android devices you can use Termux.
7
7
  Python is not required for the Windows executable.
8
8
 
9
9
  Both the Wii U and Cemu (Windows and Linux only) are supported.
10
10
 
11
- Your Wii U will need to have either the Tiramisu or Aroma environment set up or have another way to run homebrew
12
- (e.g. Haxchi, browser exploit).
11
+ Your Wii U will need to have either the Tiramisu or Aroma environment set up or have another way to run homebrew,
12
+ such as Haxchi or the browser exploit.
13
13
 
14
- On Tiramisu, use [TCPGecko](https://github.com/BullyWiiPlaza/tcpgecko) (Geckiine or SDGeckiine will work as well).
14
+ On Tiramisu, use [TCPGecko](https://github.com/BullyWiiPlaza/tcpgecko), [Geckiine](https://hb-app.store/wiiu/geckiine),
15
+ or any other app with the TCPGecko server.
15
16
 
16
17
  On Aroma, install the [TCPGecko Aroma plugin](https://codeberg.org/ShadowDoggo/TCPGeckoAroma).
17
18
 
18
19
  ## Installation
20
+ On Windows, you can use the executable provided on the releases page.
21
+ Though if you already have Python installed, it's recommended to use the package.
22
+
19
23
  To install the package from PyPI, run:
20
24
  ```
21
- python -m pip install Splatlogger
25
+ pip install Splatlogger
22
26
  ```
23
27
 
24
- Or download the latest release from GitHub and run:
28
+ Or download the latest release from Codeberg and run:
25
29
  ```
26
- python -m pip install /path/to/Splatlogger-1.x.zip
30
+ pip install path/to/Splatlogger-v1.x.zip
27
31
  ```
28
32
 
29
- On Windows, use the executable provided on the releases page.
30
- Though if you already have Python installed, it's recommended to use the package.
33
+ If you do have Python installed but do not wish to install the package, you can run the module directly from the source code.
34
+
35
+ Install the required dependencies:
36
+ ```
37
+ cd path/to/Splatlogger-v1.x/ && pip install -r requirements.txt
38
+ ```
31
39
 
32
- If you do have Python installed but do not wish to install the package, you can run the module directly from the source code:
40
+ Then run the module:
33
41
  ```
34
- cd /path/to/Splatlogger-1.x/src && python -m splatlogger
42
+ cd src/ && python -m splatlogger
35
43
  ```
36
44
 
37
45
  ## Usage
@@ -44,7 +52,7 @@ where `IP` is your Wii U's LAN IP address
44
52
 
45
53
  If using the Windows executable, run:
46
54
  ```
47
- /path/to/Splatlogger-1.x.exe -ip IP [options]
55
+ path/to/Splatlogger-1.x.exe -ip IP [options]
48
56
  ```
49
57
 
50
58
  Options:
@@ -54,26 +62,27 @@ Options:
54
62
  - `extended` - Log all player information and additional match information.
55
63
  - `stats` - Same as above with the addition of player stats (points, K/D). Requires the match to end to finish logging.
56
64
 
57
- - `-auto [option]` - Enable auto logging. When enabled will automatically log every match you play (log level must be at least `standard`).
65
+ - `-auto [option]` - Enable auto logging. When enabled will automatically log every match you play. The log level must be at least `standard`.
58
66
  - `all` - Save a log of all matches you play (default).
59
67
  - `latest` - Save a log of only the latest match.
60
68
 
61
69
  - `-aroma` - Switch to Aroma mode. Enable if using the TCPGecko Aroma plugin.
62
70
 
63
71
  - `-cemu [PID]` - Switch to Cemu mode. The `-ip` argument is not required and will be ignored.
72
+ *Note: If you have ptrace protection enabled, you'll need to run python as root. It's best to run the module from source in that case.*
64
73
  - `PID` - PID of the Cemu process (optional).
65
74
 
66
- - `-stack Address (in hex)` - (Cemu only) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
67
- Reuired for logging stats, not needed otherwise.
75
+ - `-stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
76
+ Only required for logging stats. If the default values don't work, you'll need to specify this manually.
68
77
 
69
78
  <img src="stack.png" width="600" alt="(example)">
70
79
 
71
80
  - `-silent` - Disable printing logs to the console.
72
81
 
73
- Logs are saved in `/[User]/Documents/Splatlogger/logs/[Date]`.
82
+ Logs are saved in `(User)/Documents/Splatlogger/logs/(Date)/`.
74
83
 
75
84
  To always run with the same IP and options without having to type them in manually, create an `args.txt` file in
76
- `/[User]/Documents/Splatlogger` and put the arguments following `splatlogger` in there.
85
+ `(User)/Documents/Splatlogger/` and put the arguments following `splatlogger` in there.
77
86
  Afterward any arguments passed through the command line will be ignored.
78
87
 
79
88
  Only one program can be connected to TCPGecko at a time. If you have something else connected, disconnect it beforehand.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "Splatlogger"
7
- version = "1.6"
7
+ version = "1.6.2"
8
8
  authors = [
9
9
  { name="Shadow Doggo", email="shadowdoggo@protonmail.com" }
10
10
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Splatlogger
3
- Version: 1.6
3
+ Version: 1.6.2
4
4
  Summary: A CLI PID (Principal ID)/PNID grabber and match logger for Splatoon.
5
5
  Author-email: Shadow Doggo <shadowdoggo@protonmail.com>
6
6
  License-Expression: MIT
@@ -18,36 +18,44 @@ Requires-Dist: pymemoryeditor
18
18
  A CLI PID (Principal ID)/PNID grabber and match logger for Splatoon, written in Python.
19
19
 
20
20
  ## Prerequisites
21
- To install the package, you'll need to have Python 3.11 or newer installed on your system
22
- (on Android devices you can use Termux).
21
+ To install the package, you'll need to have Python 3.11 or newer installed on your system.
22
+ On Android devices you can use Termux.
23
23
  Python is not required for the Windows executable.
24
24
 
25
25
  Both the Wii U and Cemu (Windows and Linux only) are supported.
26
26
 
27
- Your Wii U will need to have either the Tiramisu or Aroma environment set up or have another way to run homebrew
28
- (e.g. Haxchi, browser exploit).
27
+ Your Wii U will need to have either the Tiramisu or Aroma environment set up or have another way to run homebrew,
28
+ such as Haxchi or the browser exploit.
29
29
 
30
- On Tiramisu, use [TCPGecko](https://github.com/BullyWiiPlaza/tcpgecko) (Geckiine or SDGeckiine will work as well).
30
+ On Tiramisu, use [TCPGecko](https://github.com/BullyWiiPlaza/tcpgecko), [Geckiine](https://hb-app.store/wiiu/geckiine),
31
+ or any other app with the TCPGecko server.
31
32
 
32
33
  On Aroma, install the [TCPGecko Aroma plugin](https://codeberg.org/ShadowDoggo/TCPGeckoAroma).
33
34
 
34
35
  ## Installation
36
+ On Windows, you can use the executable provided on the releases page.
37
+ Though if you already have Python installed, it's recommended to use the package.
38
+
35
39
  To install the package from PyPI, run:
36
40
  ```
37
- python -m pip install Splatlogger
41
+ pip install Splatlogger
38
42
  ```
39
43
 
40
- Or download the latest release from GitHub and run:
44
+ Or download the latest release from Codeberg and run:
41
45
  ```
42
- python -m pip install /path/to/Splatlogger-1.x.zip
46
+ pip install path/to/Splatlogger-v1.x.zip
43
47
  ```
44
48
 
45
- On Windows, use the executable provided on the releases page.
46
- Though if you already have Python installed, it's recommended to use the package.
49
+ If you do have Python installed but do not wish to install the package, you can run the module directly from the source code.
50
+
51
+ Install the required dependencies:
52
+ ```
53
+ cd path/to/Splatlogger-v1.x/ && pip install -r requirements.txt
54
+ ```
47
55
 
48
- If you do have Python installed but do not wish to install the package, you can run the module directly from the source code:
56
+ Then run the module:
49
57
  ```
50
- cd /path/to/Splatlogger-1.x/src && python -m splatlogger
58
+ cd src/ && python -m splatlogger
51
59
  ```
52
60
 
53
61
  ## Usage
@@ -60,7 +68,7 @@ where `IP` is your Wii U's LAN IP address
60
68
 
61
69
  If using the Windows executable, run:
62
70
  ```
63
- /path/to/Splatlogger-1.x.exe -ip IP [options]
71
+ path/to/Splatlogger-1.x.exe -ip IP [options]
64
72
  ```
65
73
 
66
74
  Options:
@@ -70,26 +78,27 @@ Options:
70
78
  - `extended` - Log all player information and additional match information.
71
79
  - `stats` - Same as above with the addition of player stats (points, K/D). Requires the match to end to finish logging.
72
80
 
73
- - `-auto [option]` - Enable auto logging. When enabled will automatically log every match you play (log level must be at least `standard`).
81
+ - `-auto [option]` - Enable auto logging. When enabled will automatically log every match you play. The log level must be at least `standard`.
74
82
  - `all` - Save a log of all matches you play (default).
75
83
  - `latest` - Save a log of only the latest match.
76
84
 
77
85
  - `-aroma` - Switch to Aroma mode. Enable if using the TCPGecko Aroma plugin.
78
86
 
79
87
  - `-cemu [PID]` - Switch to Cemu mode. The `-ip` argument is not required and will be ignored.
88
+ *Note: If you have ptrace protection enabled, you'll need to run python as root. It's best to run the module from source in that case.*
80
89
  - `PID` - PID of the Cemu process (optional).
81
90
 
82
- - `-stack Address (in hex)` - (Cemu only) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
83
- Reuired for logging stats, not needed otherwise.
91
+ - `-stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
92
+ Only required for logging stats. If the default values don't work, you'll need to specify this manually.
84
93
 
85
94
  <img src="stack.png" width="600" alt="(example)">
86
95
 
87
96
  - `-silent` - Disable printing logs to the console.
88
97
 
89
- Logs are saved in `/[User]/Documents/Splatlogger/logs/[Date]`.
98
+ Logs are saved in `(User)/Documents/Splatlogger/logs/(Date)/`.
90
99
 
91
100
  To always run with the same IP and options without having to type them in manually, create an `args.txt` file in
92
- `/[User]/Documents/Splatlogger` and put the arguments following `splatlogger` in there.
101
+ `(User)/Documents/Splatlogger/` and put the arguments following `splatlogger` in there.
93
102
  Afterward any arguments passed through the command line will be ignored.
94
103
 
95
104
  Only one program can be connected to TCPGecko at a time. If you have something else connected, disconnect it beforehand.
@@ -5,6 +5,7 @@ import ipaddress
5
5
  import os
6
6
  import sys
7
7
  import time
8
+ import webbrowser
8
9
  from datetime import datetime
9
10
  from typing import NamedTuple
10
11
  from xml.etree import ElementTree
@@ -18,7 +19,7 @@ from .match_logger import MatchLogger
18
19
  from .tcpgecko import TCPGecko, TCPGeckoException
19
20
  from .tcpgecko_aroma import TCPGeckoAroma
20
21
 
21
- _VERSION = "1.6"
22
+ _VERSION = "1.6.2"
22
23
 
23
24
 
24
25
  class Options(NamedTuple):
@@ -57,12 +58,20 @@ def main() -> None:
57
58
  metavar="Address (in hex)")
58
59
  parser.add_argument("-silent", help="Disable printing logs to the console.", action="store_true")
59
60
 
60
- if os.path.isfile(f"{userpaths.get_my_documents()}/Splatlogger/args.txt"):
61
- with open(f"{userpaths.get_my_documents()}/Splatlogger/args.txt", encoding="utf-8") as f:
61
+ if os.path.isfile(os.path.join(userpaths.get_my_documents(), "Splatlogger/args.txt")):
62
+ with open((os.path.join(userpaths.get_my_documents(), "Splatlogger/args.txt")), encoding="utf-8") as f:
62
63
  args = parser.parse_args(f.read().split())
63
64
  else:
64
65
  args = parser.parse_args()
65
66
 
67
+ if len(sys.argv) == 1:
68
+ print('No arguments were provided. Run "splatlogger -h" for help.')
69
+ print("Would you like to open the README? (y/n)")
70
+ if input().lower() in ("y", "yes"):
71
+ webbrowser.open("https://codeberg.org/ShadowDoggo/Splatlogger/src/branch/main/README.md")
72
+
73
+ sys.exit()
74
+
66
75
  if args.aroma and args.cemu:
67
76
  print("Cannot use both Aroma and Cemu modes.")
68
77
  sys.exit()
@@ -87,9 +96,6 @@ def main() -> None:
87
96
  gecko: TCPGecko | TCPGeckoAroma | CemuGecko
88
97
  if args.cemu:
89
98
  ptr_offset = 0x503000
90
- if args.log_level == "stats" and not args.stack:
91
- print("Stack space address must be specified for stats logging on Cemu (see README).")
92
- sys.exit()
93
99
  try:
94
100
  print("Opening Cemu process...")
95
101
  gecko = CemuGecko(int(args.cemu))
@@ -97,9 +103,6 @@ def main() -> None:
97
103
  print(e)
98
104
  sys.exit()
99
105
  else:
100
- if not args.ip:
101
- print('No IP address was provided. Run "splatlogger -h" for help.')
102
- sys.exit()
103
106
  try:
104
107
  ipaddress.ip_address(args.ip)
105
108
  print(f"Connecting to: {args.ip}")
@@ -123,7 +126,7 @@ def main() -> None:
123
126
  print(f"\nAn error has occurred: {e}\nRetrying in 10 seconds...")
124
127
  time.sleep(10)
125
128
  except AssertionError:
126
- print("\nUnable to find StaticMem and PlayerInfoAry address.\nRetrying in 10 seconds...")
129
+ print("\nCould not find StaticMem and PlayerInfoAry address.\nRetrying in 10 seconds...")
127
130
  time.sleep(10)
128
131
  else:
129
132
  print("\nFailed after 3 tries.")
@@ -22,7 +22,7 @@ class CemuGecko:
22
22
 
23
23
  self._base_address = self._get_base_address()
24
24
  if self._base_address == 0:
25
- raise CemuGeckoException("Could not find Wii U memory space base address.")
25
+ raise CemuGeckoException("Could not find Cemu's Wii U memory space.")
26
26
 
27
27
  def peek_raw(self, address: int, length: int) -> bytes:
28
28
  """Read raw memory starting at address and ending at address + length.
@@ -50,13 +50,17 @@ class CemuGecko:
50
50
  return self.peek_raw(address, length).decode(encoding)
51
51
 
52
52
  def _get_base_address(self) -> int:
53
+ # Find Cemu's Wii U memory space and verify the pattern of bytes at the start of the game's memory.
54
+ # I'm pretty sure winterberry found the method for this, so credit goes to him.
53
55
  base_address = 0
54
56
  for memory_region in self._process.get_memory_regions():
55
57
  address = memory_region["address"]
56
58
  size = memory_region["size"]
57
59
  if size == 0x4E000000:
58
- base_address = address - 0x2000000
59
- break
60
+ pattern = bytes.fromhex("02D4E7")
61
+ if self._process.read_process_memory(address + 0xE000000, bytes, bufflength=20).find(pattern) != -1:
62
+ base_address = address - 0x2000000
63
+ break
60
64
 
61
65
  return base_address
62
66
 
@@ -1,6 +1,7 @@
1
1
  # Splatlogger (c) 2025 Shadow Doggo.
2
2
 
3
3
  import os
4
+ import platform
4
5
  import time
5
6
  from datetime import datetime
6
7
 
@@ -16,7 +17,7 @@ class MatchLogger:
16
17
  def __init__(self, gecko: TCPGecko | CemuGecko, log_level: str, auto_logging: bool, aroma: bool,
17
18
  cemu: bool, stack: int | None, static_mem_adr: int) -> None:
18
19
  self._gecko = gecko
19
- self._log_path = userpaths.get_my_documents() + "/Splatlogger/logs"
20
+ self._log_path = os.path.join(userpaths.get_my_documents(), "Splatlogger/logs")
20
21
  self._log_level = log_level
21
22
  self._auto_logging = auto_logging
22
23
  self._static_mem_adr = static_mem_adr
@@ -135,9 +136,14 @@ class MatchLogger:
135
136
  ptr_offset = 0
136
137
  if self._cemu:
137
138
  ptr_offset = 0x503000
138
- if isinstance(self._stack, int):
139
+ if self._stack:
139
140
  stats_adr = self._stack + Offsets.CEMU_STATS
140
141
  win_team_adr = self._stack + Offsets.CEMU_WIN_TEAM
142
+ else:
143
+ # Assume default values if stack is not provided. These seem consistent across various systems.
144
+ stack = 0xE101440 if platform.system() == "Windows" else 0xE175900
145
+ stats_adr = stack + Offsets.CEMU_STATS
146
+ win_team_adr = stack + Offsets.CEMU_WIN_TEAM
141
147
 
142
148
  if self._aroma:
143
149
  stats_adr -= 0x30
@@ -86,7 +86,7 @@ class TCPGecko:
86
86
  if status == b"\xb0":
87
87
  return b"\x00" * length
88
88
 
89
- raise TCPGeckoException("Unable to read memory.")
89
+ raise TCPGeckoException("Failed to read memory.")
90
90
 
91
91
  @staticmethod
92
92
  def _valid_range(address: int, length: int) -> bool:
File without changes