Skip to content

Extract from File

sepalani edited this page Jan 2, 2017 · 4 revisions

Prerequisites

Game's internal name

In order to find the GamestatsHTTP secret easily, knowing the game's internal name is important. You might find it by searching the game name in ALTWFC server's gslist.cfg. From left to right column, there are the game's public name, the game's internal name, the game's secret (which isn't the GamestatsHTTP secret).

Pattern matching tool

Then a pattern matching tool supporting regular expressions is needed to find the pattern that corresponds to the secret. I personally use MadEdit for this task.

Find the right file

Finally, you need to find the file where that secret is stored. Usually it's stored in the main executable file. You can use MadEdit's "Find/Replace in Files" (Search -> Find/Replace in Files CTRL-Shift-F) features to search into all files in the specified directory and its subdirectory to find a file that contains the game's internal name. These files will more likely contain network related stuff (see Searching tips). Obviously, if some files are compressed/encrypted they need to be decompressed/decrypted first.

Extract the game's GamestatsHTTP secret

Recent version

Wii games and recent Nintendo DS games seem to store the secret that matches the following regular expression:

([\-_0-9a-zA-Z]{20})([0-9a-fA-F]{32})

To also match the game's internal name use this one instead:

([\-_0-9a-zA-Z]{20})([0-9a-fA-F]{32})([^\x00]+)

The first group matches the salt, the second one matches integer constants and the third one matches the game's internal name.

Example (Mario Strikers Charged Football)

DbfBialvJznkQWYuOrRa0002282500000ef90000020042db60ecmschargedwii

Explained here

Salt (Group 1)

DbfBialvJznkQWYuOrRa

Constants (Group 2)

0002282500000ef90000020042db60ec

Constant X Constant Y Constant Z Checksum
0x00022825 0x00000ef9 0x00000200 0x42db60ec

Game's internal name (Group 3)

mschargedwii

Older version

Old games like Animal Crossing: Wild World on Nintendo DS only have a salt and nothing else. The string contains the salt only, so the game's internal name isn't attached to the string like recent versions.

The regular expression to use in that case is:

\x00([\-_0-9a-zA-Z]{20})\x00

If a string is found nearby the game's internal name or the game's secret, it's probably the game's GamestatsHTTP secret.

Example (Animal Crossing: Wild World)

gOAkBaBav5XHlGyUKOOD

Salt (Group 1)

gOAkBaBav5XHlGyUKOOD