How did Wiinnertag work?

Discussion in 'Wii - Backup Loaders' started by DismissedGuy, Oct 18, 2018.

  1. DismissedGuy
    OP

    DismissedGuy Advanced Member

    Newcomer
    2
    Aug 15, 2016
    Netherlands
    Somewhere you don't know
    Hey all,

    So basically, I want to retrieve data about my Wii game stats. My original idea of doing this was to input a custom URL in the wiinnertag.xml file, and host a webserver on my laptop to catch the requests. The webserver, however, did not receive any, questioning my theories about how Wiinnertag used to work.
    So, if anyone even knows, how did Wiinnertag (and other services like this) work, and how could I possibly tap into the data my Wii thinks is sending to the Wiinnertag server?
     
  2. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    which loader are you using?
    wiinertag use the xml info to generate a GET request, with userID (or its private key) and TitleID in the url.

    example url in USBLoaderGX:
    Code:
    http://www.wiinnertag.com/wiinnertag_scripts/update_sign.php?key={KEY}&game_id={ID6}
    if you use a private server, you don't need the key, you can use for example
    Code:
    http://yourdomain.com?{ID6}
    The request does not expect an answer from the server, it closes the connection whether the request failed or not. it's up to the server to do something with the received request (serve a page to the wii or process the request and reply 444, or other code, etc.)


    You need to explicitly enable winnertag setting to use it.
    Maybe you need to enable the network too, I don't remember if the network is initialized at game launch if you use winnertag, or just expect it to be ready and skip the init steps.
    you can enable auto init network setting to see if it helps.
     
    Last edited by Cyan, Oct 18, 2018
    DismissedGuy and Brawl345 like this.
  3. DismissedGuy
    OP

    DismissedGuy Advanced Member

    Newcomer
    2
    Aug 15, 2016
    Netherlands
    Somewhere you don't know
    Thank you for your response ^^
    I'm indeed using USB loader GX, and I seem to remember that it asks you to enable auto init network when you enable Wiinnertag, however I have not checked whether I still have that turned on. My Wii's internet connection isn't too stable either, so it might even just fail at making the actual request.

    I assume that internal IPs and specifying ports are supported (at least by GX)?
    Also, when does the Wii fire a request at the server? I assume it is when launching a game, but I'm not sure as I haven't actually ever used Wiinnertag myself.

    EDIT: So I've been trying some things out, but i'm still not receiving any requests from my Wii.
    I have a webserver running on 192.168.178.129 (port 80), and my Wii can clearly access it as connecting via the internet channel works. After some tinkering, I have set up wireshark to dump some packets and I can see the loader updating, but no request is ever sent to my webserver, even after trying to load some games. After trying to edit the Wiinnertag.xml file on my PC, I noticed wiixplorer added a zws to the end of the file. I let the loader recreate it, and edited it again (on my pc this time), making it look like this:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <Tag URL="192.168.178.129?game_id={ID6}" Key="1234567890"/>
    
    ...but it still won't work. The only thing I can think of that could be wrong is USB loader GX either trying to parse the file, or it not supporting internal IPs which sounds weird to me, but you never know. I'm guessing if it ever only tried to send a request, wireshark should've picked it up.
    Anyone knows what's wrong here?
     
    Last edited by DismissedGuy, Oct 19, 2018
  4. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    22
    Oct 27, 2002
    France
    Engine room, learning
    Port, I'm not sure. I don't remember seeing anything to use a different port so it's probably always using 80?
    ip should be supported, though I just noticed there's no check to see if it's already an IP, it just performs a DNS request on the URL expecting it to be one. that's something which could be improved in the loader.

    you need http:// in front of it and the domain should end with a slash too, or the request is dropped. I think it's a problem, no idea why it's done like this. it probably expect a domain and a filename like this: domain.tld/filename.ext, and it wasn't thought about URL in this form domain.tld?filename=xxxx

    try this :
    Code:
    <Tag URL="http://192.168.178.129/index.php?game_id={ID6}" Key="1234567890"/>
    the request is done when launching a game, and only if network is already initialized.

    I said you don't need the key if you are using a private server, because you could just get the titleID of the game you are playing, but I noticed the request is also dropped if the xml tag doesn't have both url and key values.
    so, even if your URL doesn't use {Key} you still need to have a random Key value in the tag, like you did.

    tl;dr
    - network must already be initialized before launching the game
    - winnertag.xml file must contain at least 1 "Tag" tag, containing URL and Key nodes.
    - in the URL node, the domain name must start with http:// and ends with /
    - key node should not be empty, even if unused.
    - IP should work
    - no idea if port is working

    quick look at the source today just rose more development questions for me...
     
    Last edited by Cyan, Oct 19, 2018
    DismissedGuy likes this.
  5. DismissedGuy
    OP

    DismissedGuy Advanced Member

    Newcomer
    2
    Aug 15, 2016
    Netherlands
    Somewhere you don't know
    Thank you for the info, I got it working in the end! :tada:
    After some trying, I don't think you can specify a port in the xml file, but this isn't too much of a problem. You don't actually have to point it at a file by the way, just inputting the root or any other endpoint seems to work just fine.

    Thank you again for all your help!
     
    Cyan likes this.
  6. FancyNintendoGamer567

    FancyNintendoGamer567 GBAtemp Advanced Fan

    Member
    4
    Feb 13, 2017
    United States
    I think this is kinda necrobumping, but how do you even setup your own Wiinnertag server?
     
Loading...