Skip to content

Instantly share code, notes, and snippets.

View khang06's full-sized avatar
😳
𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫

Khangaroo khang06

😳
𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫𒐫
View GitHub Profile
@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)
@khang06
khang06 / shittyinjector.cpp
Last active November 17, 2023 17:16
Barebones launcher/injector for mhynot2
#include <Windows.h>
#include <stdio.h>
#define GAME_DIR L"D:\\Games\\Genshin Impact\\Genshin Impact game"
#define DLL_PATH "C:\\Users\\Khang\\source\\repos\\mhynot2-rewritten\\x64\\Debug\\mhynot2-rewritten.dll"
int main() {
printf("hi\n");
SetCurrentDirectoryW(GAME_DIR);
@khang06
khang06 / output.txt
Created October 29, 2020 20:19
Genshin Impact Windows 1.0.1 String Literals
This file has been truncated, but you can view the full file.
0 || [Min: {0} Max: {1}]
1 || Data/_ExcelBinOutput/ShopGoodsExcelConfigData
2 || SetCombatFixedMovePoint
3 || value
4 || Transparent/Diffuse
5 || Diffuse
6 || AttachToStateIDMixin
7 || _Color
8 || _MainColor
9 || ConfigGuideInfoDialogAction
@khang06
khang06 / atlasgen.cpp
Created July 5, 2022 06:16
Simple atlas generator for Proggy Clean (and other monospace bitmap fonts)
#include <Windows.h>
#include <gdiplus.h>
#include <stdio.h>
#pragma comment(lib,"gdiplus.lib")
using namespace Gdiplus;
// https://docs.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-retrieving-the-class-identifier-for-an-encoder-use
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid) {
UINT num = 0; // number of image encoders
@khang06
khang06 / debugmenu100.pchtxt
Created August 28, 2018 00:25
bad dbgsetting patch v2
@little-endian
@nsobid-F18FF3CFCBAD0884D72ABBEB6C540D6B
@flag offset_shift 0x100
#01003BC0000A0000 Splatoon 2 1.0.0 USA
// DbgSetting over ShootingRange
@enabled
// first we need a way to access the scene
01455850 540F1A00 // add the ptr to Cstm::newScene<TitleForShow::Scene>(int,sead::Heap *) to ShootingRange (not possible to do it patching .text, you need to patch .rela.dyn otherwise it will be overwritten with the relocation stuff)
001A0F84 E0FF8152 // operator new(0x3F8) to operator new(0xFFF)
@khang06
khang06 / btdb2savecrypt.py
Last active December 29, 2021 00:49
PublicProfile.save encryption/decryption tool for Bloons TD Battles 2 1.0.4
import binascii
import sys
import string
import os
# the checksum algorithm operates on signed integers
def arsh32(n, b):
n = n & 0xFFFFFFFFF
n = (n ^ 0x80000000) - 0x80000000
return (n >> b) & 0xFFFFFFFF
@khang06
khang06 / logictest.py
Created September 15, 2021 21:19
Solving/ruining the fun of a hard logic puzzle with Z3
from z3 import *
from typing import List
# Please use this responsibly and not in any remotely competitive environment
class LogicSolver:
def __init__(self, comparables: List[int]):
self.comparables = comparables
self.vars = {}
self.solver = Solver()
@khang06
khang06 / Program.cs
Created April 19, 2021 20:15
MIDI decryption algorithm for Magic Tiles 3
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace mt3decrypt
{
class Program
{
static readonly string MIDIKey = "$jshHgdn123&Am@n0te3+x";
@khang06
khang06 / api.md
Last active December 10, 2020 15:42
ThisIsLanguage Private API

ThisIsLanguage Private API

totally unofficial, and is very subject to change

Cookies

Name Description Example (values may be censored)
til no idea, the first part is the user id 10000069420_5c81bad1a3a8e2.87403434
ci_session uri encoded (example is decoded for readability) also no idea what most of these values are a:9:{s:10:"session_id";s:32:"d223e1f94e041a3ee3d9ef90aa5f17e1";s:10:"ip_address";s:12:"127.0.0.1";s:10:"user_agent";s:115:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36";s:13:"last_activity";i:1552005746;s:9:"user_data";s:0:"";s:14:"school_user_id";s:0:"";s:12:"subscription";s:4:"full";s:8:"language";s:1:"2";s:22:"school_user_id_session";s:11:"10000069420";}693bb4598cac7347b5433e6009dd74943186b3b1

Authentication

@khang06
khang06 / tinfoildzpriv_v1.43.pem
Created March 20, 2019 22:32
new tinfoil key :)
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAnjCTLhNi8UHdEUlXMMI//LO/TsulwLwfidD3Jey3EWIfHVfm
s9qE1IBCLl1X0Mb8TNJxFM26sREKnn13+W2MI8L11T8S1jse2c50Zqp5fg7/qwgM
1N/tM6jTU9tmX5SKM0zbLzBhFkTjXvFy67NDurNZLm8i/XBFKbLTNLu5wUSI6AIG
0vhBzFDILhCSHucPKk+JrFNbik+qeNd9wzTTzIhs2xcBlUzkyBQf64wgmsouZ+1q
HBlHDJDoMnM/LVUSELlq/TPK3QPUspCadgTxqbdqhXycSfshi/1VSxDWkD6Y4FUf
HbRsmn1fLKa/lw0nDZQR0I2nwnrxMUSAEEaGRQIDAQABAoIBAAxSyWx5+yfDU0cA
+SdlwplboWgwijmhDi3s1wwfzEUw6S6ehez19Yoecclt4ST1E3uim0edHVGk+7hM
GvgV9ihlDESwFLYWxfj+0eebmTpeTcGTr3g396EiIlByk5+XkUqczqh28uFKvZHM
aoD9JqYZSbXJ16Z5xBGTCkwd4cMyBagHuZ9v3yCgigTIIM/vsggAVYTyZmxvmbFy