Skip to content

Instantly share code, notes, and snippets.

View free_private_key.md

Sometimes you need a 2048-bit RSA keypair for testing various things.

If you, like myself, have a child's sense of humor, I offer the following for your general use:

P = 19
Q = 1696986749729493925354392349339746171297507422986462747526968361144447230710192316397327889522451749459854070558277878297255552508603806832852079596337539247651161831569525505882103311631577368514276343192042634740927726070847704397913856975832811679847928433261678072951551065705680482548543833651752439700272736498378724153330763357721354498194000536297732323628263256733931353143625854828275237159155585342783077681713929284136658773985266864804093157854331138230313706015557050002740810464618031715670281442110238274404626065924786185264268216336867948322976979393032640085259926883014490947373494538254895109731

N = 0xFF69696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696
View SymbolEncountPokemonGimmickSpawner.txt
z_wr0301_SymbolEncountPokemonGimmickSpawner_WR03_Common: (probably on Slippery Slope)
Location: (23828.3, 7721.5, 51077.1)
Normal: Mamoswine Lv.65 (A0FFFB5BFC2B229D)
Overcast: Swablu Lv.60 (A0FFF45BFC2B16B8)
Raining: Swablu Lv.60 (A0FFF45BFC2B16B8)
Thunderstorm: Swablu Lv.60 (A0FFF45BFC2B16B8)
Intense Sun: Snorlax Lv.65 (A103685BFC2E11AB)
Snowing: Amaura Lv.60 (A0FFF85BFC2B1D84)
Snowstorm: Mamoswine Lv.65 (A0FFFB5BFC2B229D)
Sandstorm: Mamoswine Lv.65 (A0FFFB5BFC2B229D)
View Encounters_Shield.txt
000 - Route 1:
All Weather (Lv. 2-5):
- Skwovet 40%
- Blipbug 30%
- Caterpie 15%
- Grubbin 10%
- Hoothoot 05%
001 - Route 2:
@SciresM
SciresM / gw_flash.py
Last active July 24, 2022 15:46
utility for interacting with gateway modchip updates
View gw_flash.py
import sys
from struct import pack as pk, unpack as up
def u32(x):
return x & 0xFFFFFFFF
def tea_update_custom_mac(mac, v, k):
v0, v1 = v[0], v[1]
cur_sum = 0xC6EF3720
k0, k1, k2, k3 = k[0], k[1], k[2], k[3]
@SciresM
SciresM / ushabti.py
Last active March 28, 2021 22:28
Ushabti predictor for Spelunky 2 seeded runs.
View ushabti.py
import sys
# Spelunky 2 ushabti prediction for seeded runs, author SciresM.
def u32(v):
return v & 0xFFFFFFFF
def u64(v):
return v & 0xFFFFFFFFFFFFFFFF
@SciresM
SciresM / spelunky2_extract.py
Created September 30, 2020 11:44
Quick and dirty Spelunky 2 asset extraction. Assets are a weird chacha20 variant, there are at least two cryptographic errors due to typos....
View spelunky2_extract.py
import zstd
from struct import pack as pk, unpack as up
import subprocess as sp
# Quick and dirty Spelunky 2 asset extraction, author SciresM.
# Assets are protected by a weird chacha20 variant.
# The developers made an unfortunate set of typos that
# significantly weakens the asset crypto...
def rotate_left(a, b):
@SciresM
SciresM / cafe_mix.py
Last active December 26, 2020 19:39
View cafe_mix.py
import os, sys, zlib, traceback
from Crypto.Cipher import AES
from struct import unpack as up
XORPAD = '3F99BB49B43CBBD339FE5FEA463316A8'.decode('hex')
KEY = 'CAECB4CA65678965CBE67D7A3AFD228C'.decode('hex')
IV = 'A65D5EA2D54AD0436DD46158C191361D'.decode('hex')
def safe_open(path, mode):
import os
View GiveRandomMark.cpp
#include <cstdint>
#include <cstddef>
#include <cstdbool>
using u32 = uint32_t;
u32 GetRandom(u32 range);
u32 GetCurrentHour();
bool IsFishing();
View sword_pml_port_1.2.0.py
from idautils import *
from idaapi import *
from idc import *
from ida_hexrays import *
START_100 = 0x7100770C10
END_100 = 0x710077FC60
START_110 = 0x7100770E30
View Sword 1.2.0 New Encounter Locations
// Isle of Armor
908A64718CA374E6 - z_wr0201 - in the Fields of Honor
908A63718CA37333 - z_wr0202 - in the Soothing Wetlands
908A62718CA37180 - z_wr0203 - in the Forest of Focus
908A69718CA37D65 - z_wr0204 - on Challenge Beach
908A68718CA37BB2 - z_wr0205 - in Brawlers’ Cave
908A67718CA379FF - z_wr0206 - on Challenge Road
908A66718CA3784C - z_wr0207 - in Courageous Cavern
908A6D718CA38431 - z_wr0208 - in Loop Lagoon
908A6C718CA3827E - z_wr0209 - in the Training Lowlands