GTS protocol: Difference between revisions

From ProjectPokemon Wiki
Jump to navigation Jump to search
m (http headers)
No edit summary
Line 3: Line 3:
Communication with the GTS is done over regular HTTP with http://gamestats2.gs.nintendowifi.net/.
Communication with the GTS is done over regular HTTP with http://gamestats2.gs.nintendowifi.net/.


=HTTP headers=
==HTTP headers==


The games don't seem to care about these at all.  The GTS sends back a bunch of boilerplate response headers, but the game happily accepts a response with only a Content-Length.
The games don't seem to care about these at all.  The GTS sends back a bunch of boilerplate response headers, but the game happily accepts a response with only a Content-Length.
==Protocol==
This takes the form of HTTP GET requests to the server. The requests are of the form <code><page>.asp?pid=<pid>&hash=<hash>&data=<data></code>. Before each "real" request, the game sends a request of the form <code><page>.asp?pid=<pid></code> and the server responds with a 32-byte challenge token. The game computes <code>sha1("sAdeqWo3voLeC5r16DYv" + token)</code> and uses that as the hash value which it sends to the server. The data parameter is encrypted with an unknown algorithm.

Revision as of 01:39, 21 March 2010

The following is wild conjecture based on LordLandon's sendpkm.py.

Communication with the GTS is done over regular HTTP with http://gamestats2.gs.nintendowifi.net/.

HTTP headers

The games don't seem to care about these at all. The GTS sends back a bunch of boilerplate response headers, but the game happily accepts a response with only a Content-Length.

Protocol

This takes the form of HTTP GET requests to the server. The requests are of the form <page>.asp?pid=<pid>&hash=<hash>&data=. Before each "real" request, the game sends a request of the form <page>.asp?pid=<pid> and the server responds with a 32-byte challenge token. The game computes sha1("sAdeqWo3voLeC5r16DYv" + token) and uses that as the hash value which it sends to the server. The data parameter is encrypted with an unknown algorithm.