Skip to content

Instantly share code, notes, and snippets.

View jonbarrow's full-sized avatar
🏠
Working from home

Jonathan Barrow jonbarrow

🏠
Working from home
View GitHub Profile
@jonbarrow
jonbarrow / regions.md
Created February 4, 2024 20:52
Region ID information for the WiiU/3DS

Nintendo region values

Nintendo stores regions as uint32s made of 2 parts. The first byte is the country ID, with the remaining 3 bytes being the ID of a specific region in the country. Below is a table of all region values as they appear on the Wii U.

Japan

ID ISO Japanese English French German Italian Spanish Chinese (simplified) Korean Dutch Portuguese Russian Chinese (traditional) Unknown 1 Unknown 2 Unknown 3 Unknown 4
0x01 JP 日本 Japan Japon Japan Giappone Japón 日本 일본 Japan Japão Япония 日本 Japan Japan Japan Japan

Japan Regions

| Name | ID | Coordinates | Japanese | English | French | German | Italian | Spanish | Chinese (simplified) | Korean | Dutch | Portuguese | Russian | Chinese (traditional) | Unknown 1 | Unkn

@jonbarrow
jonbarrow / MvDKTS Miiverse AppData docs.md
Last active January 9, 2024 18:06
Documentation on the Miiverse "AppData" used in Mario vs. Donkey Kong: Tipping Stars

App Data format

Miiverse AppData for Mario vs. Donkey Kong Tipping Stars has 3 different main types:

  1. Community Info
  2. Post Info
  3. Comment Info

Each type starts with a different 4 byte string denoting which info type it is

@jonbarrow
jonbarrow / connect.js
Last active October 22, 2023 21:20
Discord remote login script example
/*
Discord is able to log users in by scanning QR codes on the login screen,
these are randomly generated by the server and are sent to the client
over a secure web socket as a fingerprint, which gets scanned in by the app
and then used to login remotely. The QR codes actual contents are just
https://discord.com/ra/FINGERPRINT
This script shows how to connect to Discord and generate these
fingerprints automatically
*/
@jonbarrow
jonbarrow / archive.py
Last active April 11, 2021 04:24
Rip SMM1 course data and metadata from Nintendo's servers using NEX
'''
Credit Jonathan Barrow 2021
This will rip courses from SMM1 using NEX to automate the process
Use at your own risk, I am not resposible for any bans
Requires Python 3 and https://github.com/Kinnay/NintendoClients
Licensed under GNU GPLv3
'''
@jonbarrow
jonbarrow / wiiu-title-ticket-downloader-parser.js
Created November 16, 2019 03:21
Script to download title tickets and certificates from the NUS CDN and parse them
const got = require('got');
const fs = require('fs');
const NodeRSA = require('node-rsa');
const { xml2js } = require('xml-js');
// Client to connect to the eShop SOAP api
const soapClient = got.extend({
baseUrl: 'https://ecs.wup.shop.nintendo.net',
method: 'post',
cert: fs.readFileSync('./eshop-common.crt'), // Client certificates. You can find these online, they are common to all consoles
@jonbarrow
jonbarrow / wonderfulsubs.py
Created November 14, 2019 04:01
Python scraper for wonderfulsubs.com
from pyee import BaseEventEmitter # Event emitter class base
import requests # request module
import asyncio # async utils
import concurrent.futures # futures (like a JS promise)
# constants
URL_BASE = "https://www.wonderfulsubs.com/api/media"
SEARCH_URL = "%s/search?q=" % URL_BASE
SERIES_URL = "%s/series?series=" % URL_BASE
STREAM_URL = "%s/stream?code=" % URL_BASE
@jonbarrow
jonbarrow / wonderfulsubs.js
Created November 8, 2019 22:51
Scraper for wonderfulsubs.com
const got = require('got');
const async = require('async');
const URL_BASE = 'https://www.wonderfulsubs.com/api/media';
const SEARCH_URL = `${URL_BASE}/search?q`;
const SERIES_URL = `${URL_BASE}/series?series`;
const STREAM_URL = `${URL_BASE}/stream?code`;
// Options for "got"
const OPTIONS = {
@jonbarrow
jonbarrow / animeultima.js
Created October 24, 2019 01:08
Scraper for animeultima.eu
const cloudscraper = require('cloudscraper'); // Bypass cloudfare
const { JSDOM } = require('jsdom'); // DOM access in Node
const async = require('async'); // async utils
const animeIdRegex = /anime-id="(\d*)"/; // Regex to find the anime ID for the site
const sourceRegex = /file: "(.*)"/g;
const iframeRegex = /iframe .* src="(.*)"/;
// URL list
const URL_BASE = 'https://animeultima.eu';
@jonbarrow
jonbarrow / writeup.md
Last active September 4, 2019 04:37
[Vulnerability] GitKraken Pro Free write up

I emailed GitKraken on August 12th, 2019 about this issue which went nowhere

In GitKraken there is a potential vulnerability that allows access to Pro features without paying for them. I have tested this in 6.0.1, 6.1.1, and 6.1.4, but I suspect it works in all other versions as well.

Using a proxy server, such as Fiddler on Windows, it is trivial to change the response from the "https://api.gitkraken.com/phone-home" API endpoint to trick GitKraken into thinking the user has a Pro (or other) plan, unlocking the features of that plan even if the user has not paid for it.

This is done by changing the response from the "https://api.gitkraken.com/phone-home" endpoint to:

{
# **********************************************************************
# * Project: 00-piws-vars *
# * Created: 05/06/2018 22:27 *
# * Author: Martin Svensson aka ztealmax - pi-workbench.org *
# * Info: create in /etc/chromium-browser/customizations/ *
# * Note: replaces rpi-chromium-mods *
# **********************************************************************
#
PICHROMIUMMODS="/etc/chromium-browser/customizations/00-rpi-vars"