From bcd61b8a37e08387f40121eb6b4a4ea51059f300 Mon Sep 17 00:00:00 2001 From: NinjaCheetah <58050615+NinjaCheetah@users.noreply.github.com> Date: Wed, 17 Jul 2024 20:48:16 -0400 Subject: [PATCH] Slightly improve fakesign docstrings --- src/libWiiPy/title/ticket.py | 3 +++ src/libWiiPy/title/tmd.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/libWiiPy/title/ticket.py b/src/libWiiPy/title/ticket.py index 697a1f7..d55f344 100644 --- a/src/libWiiPy/title/ticket.py +++ b/src/libWiiPy/title/ticket.py @@ -234,6 +234,9 @@ class Ticket: older IOS versions that incorrectly check the hash using strcmp() instead of memcmp(). The signature will also be erased and replaced with all NULL bytes. + The hash is brute-forced by using the first two bytes of an unused section of the Ticket as a 16-bit integer, + and incrementing that value by 1 until an appropriate hash is found. + This modifies the Ticket object in place. You will need to call this method after any changes, and before dumping the Ticket object back into bytes. """ diff --git a/src/libWiiPy/title/tmd.py b/src/libWiiPy/title/tmd.py index 752e7f7..d398da1 100644 --- a/src/libWiiPy/title/tmd.py +++ b/src/libWiiPy/title/tmd.py @@ -235,6 +235,9 @@ class TMD: older IOS versions that incorrectly check the hash using strcmp() instead of memcmp(). The signature will also be erased and replaced with all NULL bytes. + The hash is brute-forced by incrementing an unused 16-bit integer in the TMD by 1 until an appropriate hash is + found. + This modifies the TMD object in place. You will need to call this method after any changes, and before dumping the TMD object back into bytes. """