Closed TheGreatRambler closed 1 month ago
Fixed
The SMM2 API operates correctly under keygen 18 for 18.0.1 so I feel reasonably safe about that. yellows8 also notes that the keygen is 0x11
which, going from previous updates, is always 1 less than the keygen used in DAuth
.
Reverted
I believe that the DAuth server accepts any key generation, regardless of the system version. While it may work, I would like to accurately copy the behavior of the client, so I would like to see this verified another way. The fact that the update bot detects key revision 17 doesn't really mean anything, because the key generation that is used by the DAuth client is indepedent from that, and hardcoded into the account sysmodule.
I might have time to check it with a MitM this weekend.
After testing you're right that it doesn't matter what keygen I use, the request succeeds (did this change in the 2024 Dragons update? I seem to remember DAuth failing on the wrong keys in the past). I will keep this fork's keygen on 18 until you can verify.
Hi, I checked with a mitm on system version 18.0.1 and it says key_generation 17.
POST /v7/device_auth_token HTTP/1.1
Host: dauth-lp1.ndas.srv.nintendo.net
Accept: */*
Content-Type: application/x-www-form-urlencoded
X-Nintendo-PowerState: FA
Content-Length: 211
challenge=[REDACTED]&client_id=[REDACTED]&ist=false&key_generation=17&system_version=CusHY#00120001#chuxR_O35JFyJq7dIlT8yP1A-j1yBcF-iU4iVDjHt9g=&mac=[REDACTED]
Thanks for checking.
@TheGreatRambler If you change the key generation to 17 I will accept the PR.
did this change in the 2024 Dragons update?
The server has always accepted different key generations as far as I know. I tested it some time ago when 15.0.0 was the latest system version. Back then, the following key generations were accepted for /v6
and /v7
: https://github.com/nintendo-playground/dauth-server/blob/main/dauth/main.py#L49-L52
Done, thank you for confirming @Ixaruz
Thank you very much. A few things before I am merging:
nintendo/switch/common.py
. Please use tabs instead.account
sysmodule, it looked like Nintendo forgot to update the key generation in the DAuth client. Have you verified that it uses key generation 18 on system version 18.0.x? This is important because DAuth is the server where Nintendo implements device bans.Do you want to fix these things?