Skip to content

Instantly share code, notes, and snippets.

View jaames's full-sized avatar
🐳
~

James jaames

🐳
~
  • UK, '97
  • 23:08 (UTC +01:00)
View GitHub Profile
@jaames
jaames / flipnote_studio_ui_strings.md
Created April 2, 2018 16:04
UI strings from Flipnote Studio for the Nintendo DSi

Message and layout text parsed from Flipnote Studio's .tbl and .bmg files.

Layout

Index ID Attr Message
0000 BackButton_BackButtonText 0x05 Back
0001 BackButton_SaveButtonText 0x05 Save
0002 BirthDay_BirthDayTitleDayText 0x06 Day
0003 BirthDay_BirthDayTitleMonthText 0x06 Month
@jaames
jaames / thumbtool.py
Last active January 25, 2021 03:05
custom flipnote thumbnail tool
# Custom Flipnote (.ppm) Thumbnail Tool
# Create a ppm thumbnail from any 64 x 48 image
# Requires Pillow - https://github.com/python-pillow/Pillow
#
# By Jaames <github.com/jaames | @rakujira on twitter>
#
# Usage: python3 thumbtool.py input.ppm thumb.png
from PIL import Image
from sys import argv
@jaames
jaames / miitomo_questions.md
Last active February 8, 2024 18:31
Full set of questions dumped from Miitomo
@jaames
jaames / miitomo-asset.py
Last active June 19, 2018 10:03
crappy miitomo asset scraper (v2)
# crappy miitomo asset downloader
# usage: python3 miitomo-asset.py < url for manifest.json >
from pathlib import Path
from io import BytesIO
from sys import argv
import zipfile
import urllib.request
import json
@jaames
jaames / drawingimage.py
Last active January 25, 2021 03:05
python class for processing miiverse drawing images
from PIL import Image
SAMPLING_METHODS = {
"ANTIALIAS": Image.ANTIALIAS,
"BILINEAR": Image.BILINEAR,
"BICUBIC": Image.BICUBIC,
"NEAREST": Image.NEAREST
}
class drawingImage:
@jaames
jaames / kwzSignature.py
Last active January 25, 2021 03:05
resign a kwz for flipnote studio 3d. handles signature and all crc32 checksums.
# usage: python3 kwzSignature.py <privkey.pem> <target.kwz>
# rsa module installed with:
# pip3 install rsa
# documentation here:
# https://stuvel.eu/files/python-rsa-doc/usage.html
import struct
import rsa
import zlib
@jaames
jaames / mii-qr.py
Created July 24, 2018 21:02
Decrypt Mii QR code data from 3DS / Wii U / Miitomo
# Decrypt Mii QR codes from 3DS / Wii U / Miitomo
# Usage: python3 <input file> <output file>
# QR docs: https://www.3dbrew.org/wiki/Mii_Maker
from Crypto.Cipher import AES
from sys import argv
key = bytes([0x59, 0xFC, 0x81, 0x7E, 0x64, 0x46, 0xEA, 0x61, 0x90, 0x34, 0x7B, 0x20, 0xE9, 0xBD, 0xCE, 0x52])
with open(argv[1], "rb") as infile, open(argv[2], "wb") as outfile:

Setup

  1. Enter the Nintendo WFC Settings menu, which can be found in any WFC-enabled game.

  2. Select "Nintendo Wi-Fi Connection Settings".

  3. Set up a new connection if you haven't already done so, then select the connection slot you wish to use.

  4. Scroll down and set "Auto-obtain DNS" to "No", then set Primary DNS to 178.62.43.212 and Secondary DNS to 0.0.0.0. Select "OK" to confirm.

@jaames
jaames / manifest.json
Last active December 18, 2018 20:18
Webarchive asset manifest for Miitomo
{
"remoteVersionUrl": "https://download-cdn.miitomo.com/native/20180125111639/manifests/v2_20180405_3_android/version.json",
"remoteManifestUrl": "https://download-cdn.miitomo.com/native/20180125111639/manifests/v2_20180405_3_android/manifest.json",
"packageUrl": "https://web.archive.org/web/0id_",
"version": "v2.0.1481",
"engineVersion": "2",
"assets": {
"20150101afesgaeukgwebp.zip": {
"md5": "",
"path": "http://download-cdn.miitomo.com/native/20180125111639/android/v2/20150101afesgaeukgwebp.zip",
@jaames
jaames / kwz_adpcm_decoder.py
Last active May 28, 2019 20:12
kwz adpcm decoder
import numpy as np
import wave
import audioop
from sys import argv
step_table = np.array([
7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
130, 143, 157, 173, 190, 209, 230, 253, 279, 307,