-
-
Notifications
You must be signed in to change notification settings - Fork 61
mitmproxy instructions
Update – September 2018: The v1.4.1 update to the Nintendo Switch Online app changed the method used to log in to Nintendo accounts; for the time being, we are no longer able to generate cookies within the script (i.e. without using the app).
This update also added certificate pinning which prevents mitmproxy from working on Android 7.0 and above due to the Network Security Configuration feature. Use iOS or an older version of Android (either on a real device or emulator, e.g. Nox, which comes with Android 4.4.2) to follow the instructions below.
The following method can be used to intercept your phone's traffic to grab your iksm_session
cookie from the app.
-
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
. -
Obtain your computer's internal IP address:
(Mac) Runipconfig getifaddr en1
from Terminal, or option-click on the Wi-Fi icon in the menu bar.
(Windows) Runipconfig
from Command Prompt/PowerShell and look under "IPv4 Address." -
Run
mitmweb
from the command line or by clicking on the downloaded file. -
Configure your phone's network settings:
(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. -
Go to http://mitm.it/ on your phone and download/install the certificate for your device (only needs to be done once). On iOS (10.3 and later), you'll also need to navigate to Settings > General > About > Certificate Trust Settings, and turn on trust under "Enable full trust for root certificates." For more information, see the certificates page on the mitmproxy docs website.
-
Open the Nintendo Switch Online app (Android, iOS) on your phone, log in if you have not done so previously, and click on Splatoon 2 under Game-Specific Services.
-
In the mitmweb tab that opened before, look for the line that says
https://app.splatoon2.nintendo.net/?lang=en-US
. Grab thecookie
value from the Request tab (in the formatiksm_session=xxxxx
wherexxxxx
is your cookie). Copy and paste this into the script when prompted. (Or, if the script exits from an "Invalid token" error, enter it manually by openingconfig.txt
and enteringxxxxx
as the value forcookie
.) -
Return your phone Wi-Fi settings back to normal (i.e. set Proxy back to "None").