Skip to content

Instantly share code, notes, and snippets.

🐋
~

james jaames

View GitHub Profile
@jaames
jaames / ptcl.py
Created Apr 2, 2019
unfinished nintendo particle format (.ptcl) parser
View ptcl.py
# .ptcl parser for miitomo
# heavily unfinished, i couldn't work out how to find subtexture sizes
import struct
import numpy as np
from PIL import Image
class PTCLSection:
def __init__(self, magic=b'', offset=0, size=0, data_offset=0):
self.magic = magic
@jaames
jaames / manifest.json
Last active Dec 18, 2018
Webarchive asset manifest for Miitomo
View manifest.json
{
"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",
View kwfc-guide.md

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 1.1.1.1. Select "OK" to confirm.

@jaames
jaames / mii-qr.py
Created Jul 24, 2018
Decrypt Mii QR code data from 3DS / Wii U / Miitomo
View mii-qr.py
# 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:
@jaames
jaames / kwzSignature.py
Last active Feb 9, 2019
resign a kwz for flipnote studio 3d. handles signature and all crc32 checksums.
View kwzSignature.py
# 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 / drawingimage.py
Last active Feb 9, 2019
python class for processing miiverse drawing images
View drawingimage.py
from PIL import Image
SAMPLING_METHODS = {
"ANTIALIAS": Image.ANTIALIAS,
"BILINEAR": Image.BILINEAR,
"BICUBIC": Image.BICUBIC,
"NEAREST": Image.NEAREST
}
class drawingImage:
@jaames
jaames / miitomo-asset.py
Last active Jun 19, 2018
crappy miitomo asset scraper (v2)
View miitomo-asset.py
# 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 / miitomo_questions.md
Last active Oct 31, 2018
Full set of questions dumped from Miitomo
View miitomo_questions.md
@jaames
jaames / thumbtool.py
Last active Nov 30, 2018
custom flipnote thumbnail tool
View thumbtool.py
# 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
You can’t perform that action at this time.