From a3355a7b69a7f56828df7814d0d0cdcf0e7e47c8 Mon Sep 17 00:00:00 2001 From: Spotlight Date: Tue, 18 Aug 2020 16:07:36 -0500 Subject: [PATCH] Implement GetChallenge --- ias.go | 5 +++++ main.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ias.go b/ias.go index 850eaa6..5aa9b3d 100644 --- a/ias.go +++ b/ias.go @@ -42,6 +42,11 @@ func iasHandler(e Envelope, doc *xmlquery.Node) (bool, string) { case "GetChallenge": fmt.Println("The request is valid! Responding...") + // The official Wii Shop Channel requests a Challenge from the server, and promptly disregards it. + // (Sometimes, it may not request a challenge at all.) No attempt is made to validate the response. + // It then uses another hard-coded value in place of this returned value entirely in any situation. + // For this reason, we consider it irrelevant. + e.AddKVNode("Challenge", SharedChallenge) break case "GetRegistrationInfo": diff --git a/main.go b/main.go index a025992..97df355 100644 --- a/main.go +++ b/main.go @@ -28,6 +28,11 @@ import ( "strings" ) +const ( + // Any given challenge must be 10 characters or less (challenge.length > 0xb) + SharedChallenge = "NintyWhyPls" +) + // checkError makes error handling not as ugly and inefficient. func checkError(err error) { if err != nil {