Skip to content

mitmproxy instructions

eli fessler edited this page Dec 9, 2017 · 31 revisions

The v1.1.0 update to the Nintendo Switch Online app unfortunately changed the method used to log in to Nintendo accounts and, as a result, removed the ability to generate cookies within the script (i.e. without using the app). The following method can be used to intercept your phone's traffic to grab your iksm_session cookie from the app.

Obtaining your SplatNet cookie using mitmproxy

  1. Download mitmproxy by following the instructions for your operating system here. Releases for Mac, Windows, and Linux can be found here. If you're on macOS and have Homebrew installed, you can run brew install mitmproxy.

  2. Run mitmweb by clicking on the downloaded/installed file. You can also navigate to the folder and run ./mitmweb from the command line.

  3. Obtain your computer's internal IP address:
    (Mac) Go to System Preferences > Network > Wi-Fi > Advanced… > TCP/IP > IPv4 Address.
    (Windows) Run ipconfig from Command Prompt/PowerShell and look under "IPv4 Address."

  4. (Android) Go to Settings > Wi-Fi > long press to modify network. Set proxy to "Manual" under advanced options. For proxy hostname, enter your computer's internal IP from before and enter the port as 8080.
    (iOS) Go to Settings > Wi-Fi > tap on network name or info icon. Chose "Manual" under HTTP proxy. For server, enter your computer's internal IP from before and enter the port as 8080.

  5. Go to http://mitm.it/ on your phone and download/install the certificate for your device.

  6. Open the Nintendo Switch Online app on your phone, log in if you have not done so previously, and click on Splatoon 2 under Game-Specific Services.

  7. In the mitmweb tab that opened before, look for the line that says https://app.splatoon2.nintendo.net/?lang=en-US. Grab the cookie value from the Request tab (in the format iksm_session=xxxxx where xxxxx is your cookie). Copy and paste this into the script when prompted. (Or, enter it manually by opening config.txt and entering xxxxx as the value for cookie.)

    The default format for config.txt file is provided below for reference:

    {
        "api_key": "",
        "cookie": "",
        "user_lang": ""
    }
    

    where api_key is your stat.ink API key, cookie is your iksm_session cookie from the app, and user_lang is your locale. The session_token key present in previous versions of splatnet2statink is no longer used and will be ignored.

    See the custom keys page for other optional keys that you may manually include.

Clone this wiki locally