Skip to content

Instantly share code, notes, and snippets.

View MarioMasta64's full-sized avatar

Isaiah Love MarioMasta64

View GitHub Profile
@yifanlu
yifanlu / gist:e80db121d38aceb8cca0e03cefd5853b
Last active November 3, 2023 22:55
3DS System Transfer + NNID & eShop on new region
This is an ADVANCED guide and should not be attempted by anyone who does not COMPLETELY understand each step and what it does to their device. Additionally, the prerequisite is that you have already performed a region change on your 3DS. You also need access to another 3DS on the target region that you can format to a non-NNID linked state (you can use emuNAND here). For simplicity, I am going to assume you are region changing a N3DS from Japan to USA and have access to a USD O3DS. The guide is in two parts: System Transfer and NNID Linking. For those who wish to just have access to USA eShop (and the ability to download free games; if you only want to use eShop to purchase games, you do not have to link a NNID) you can skip to the second part.
To modify requests, I use Charles Proxy to set breakpoints so I can change requests and responses as they come in. However, you can do it in any why you choose. Also, since 9.2 eShop was disabled, you may have to additionally modify all requests from the 3DS to send a
import binascii, sys, random, asn1
from fractions import gcd
def extended_gcd(aa, bb):
lastremainder, remainder = abs(aa), abs(bb)
x, lastx, y, lasty = 0, 1, 1, 0
while remainder:
lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder)
x, lastx = lastx - quotient*x, x
y, lasty = lasty - quotient*y, y
@keijiro
keijiro / gpd_pocket.md
Last active December 18, 2019 02:04
My personal notes on GPD Pocket

pic

I backed the [GPD Pocket] project on Indiegogo immediately after its launch announcement. I had to wait for a few extra months from their estimated release date (it seems they had some technical issues with Linux driver development) then finally got a device last week. The production quality is still not perfect but significantly improved from the previous product (GPD Win) -- I can admit that I'm almost satisfied with it.

@ioistired
ioistired / revisionist.py
Last active April 29, 2023 08:10
Discord selfbot that lets you see when people edit or delete their messages
#!/usr/bin/env python3
# encoding: utf-8
"""
Revisionist: logs Discord message edits and revisions
Copyright © 2017 Benjamin Mintz
https://bmintz.mit-license.org/@2017
"""
import discord
@roblabla
roblabla / HABILITIES.md
Last active March 14, 2024 03:24
We believe in your habilities.

Muh Switch Keys

So you want to decrypt switch content ? Well, the good news is that all the tools required to do that are written up! The great news is, since this is crypto we're talking about, you'll have to find the keys. Yourself. Like it's easter.

So here you can find a template of the $HOME/.switch/prod.keys file that hactool uses to decrypt content. It contains all the SHA256 and location of the keys and seeds, so you can find them yourselves.

Note that all the seeds (the keys that end with _source) are used along with the master_key_## to derive an actual key. If you have somehow obtained the key without the seed, you can rename xxx_source to xxx_## (where ## is the master key number) and put your key there.

How the heck do I obtain dem keys ?

@MCMrARM
MCMrARM / kek.py
Last active June 17, 2018 19:14
A Python script to decrypt Switch's SSL private key
# A Python script to decrypt Switch's SSL private key
# Thanks to roblabla for help
# Heavily based on Atmosphere's exosphere
# Usage: kek.py <source> <destination>
# Make sure to fill in the proper keys in the script
import struct
import sys
from Crypto.Cipher import AES
from Crypto.Util import Counter
@Thealexbarney
Thealexbarney / PqCrypt.cs
Last active June 5, 2018 14:10
Pokemon Quest save decrypter and encrypter
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace PqCrypt
{
public static class Program
{
public static readonly byte[] Key = Encoding.UTF8.GetBytes("C7PxX4jPfPQ2SmzB");
#include <string.h>
#include <stdio.h>
#include <switch.h>
static Handle g_port;
static uint64_t g_procID;
#define MODULE_HBL 111
@khang06
khang06 / 0-SD-GUIDE.md
Last active April 19, 2024 07:41
Switch SD Dumping 101

https://gbatemp.net/threads/nintendo-switch-sd-to-nsp-dumper.514816/ for a more automated and easier way to do this

This guide assumes you have previous experience with hactool and messing with your NAND. You aren't supposed to blindly copy commands in this, so read before pasting!

Also, the Python sections require Python 2.7 and pycrypto. Make sure your hactool is v1.2 or above.

Obtaining Your SD Seed

  1. Run https://cdn.discordapp.com/attachments/432400335235973120/478053328857726976/Compelled-Disclosure.nro (source at https://github.com/shadowninja108/Compelled-Disclosure, thx Shadów#6239)
from Crypto.Cipher import AES
from Crypto.Util import Counter
import struct
"""
typedef struct boot_dat_hdr
{
unsigned char ident[0x10];
unsigned char sha2_s2[0x20];
unsigned int s2_dst;