Skip to content

Instantly share code, notes, and snippets.

Avatar
🐳
~

James jaames

🐳
~
View GitHub Profile
@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 / 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",
@jaames
jaames / pegaswitch.html
Last active Dec 18, 2018
Original landing page for the PegaSwitch exploit by ReSwitched team (built in one evening :P)
View pegaswitch.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PegaSwitch</title>
<meta name="description" content="PegaSwitch -- an exploit toolkit for the Nintendo Switch">
<meta name="twitter:card" content="summary">
<meta property="og:site_name" content="PegaSwitch">
@jaames
jaames / adpcm.js
Last active Feb 9, 2019
javascript implementation of converting 4-bit adpcm audio to float32 pcm
View adpcm.js
// ADPCM decoder implementation based on https://github.com/jwzhangjie/Adpcm_Pcm/blob/master/adpcm.c
const indexTable = [
-1, -1, -1, -1, 2, 4, 6, 8,
-1, -1, -1, -1, 2, 4, 6, 8
];
const stepSizeTable = [
7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
@jaames
jaames / whitespace.txt
Last active Mar 15, 2019
Whitespace string that can (kinda) break the internet ⁠ ⁠ ⁠ ⁠ ⁠ ⁠ ⁠ ⁠ ⁠
View whitespace.txt
// Austin Burk's version:
  ⁠᠎
// Modified to not display a missing character glyph on iOS:
View 3ds_packet_capture.md

Requirements

You will need a 3DS running Luma CFW, as well as a computer that is capable of creating an access point or running a proxy.

SSL Module Patch

It is necessary to disable Root CA Verification in order to capture all 3DS traffic. We recommend doing this with SciresM's 3DS-SSL-Patch.

For ease of use, you can download this premade code.ips patch and place it at /luma/titles/0004013000002F02/code.ips on your 3DS' SD card. Make sure that you've enabled Luma's game patching feature by holding down the select button while powering on your 3DS.

@jaames
jaames / kwz_adpcm_decoder.py
Last active May 28, 2019
kwz adpcm decoder
View kwz_adpcm_decoder.py
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,
@jaames
jaames / dsi_shop_kong_api.md
Last active May 28, 2019
Nintendo DSI Shop reverse-engineering notes
View dsi_shop_kong_api.md

ECommerceInterface

This API provides access to information and features related to ecommerce. Such as providing a list of installed titles, etc

Setup

First it's necessary to create an instance of the ECommerceInterface class, the instance is used to interact with the API.

Nintendo create a single instance and store it globally as ec:

@jaames
jaames / sudoplayer.html
Created May 5, 2017
sudomemo video player component, for Svelte (https://svelte.technology/guide)
View sudoplayer.html
<div class="player">
<div class="player__stage" ref:player on:click="togglePlay()">
<video
class="player__video"
src="{{src}}"
loop="{{meta.loop}}"
ref:video
on:play="_video_play()"
on:pause="_video_pause()"
on:timeupdate="_video_timeupdate()"
@jaames
jaames / kwz.php
Created Sep 26, 2019
php kwz metadata parser
View kwz.php
<?php
// Project Kaeru KWZ / KWC parser
// ver 1.0
//
// Written by James Daniel
// github.com/jaames | rakujira.jp
// ----- USAGE -----