Skip to content

Instantly share code, notes, and snippets.

@SciresM
SciresM / gw_flash.py
Last active Oct 8, 2020
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 Oct 5, 2020
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 Sep 30, 2020
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):
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
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:
View nestPrettyShield.txt
Nest ID: 1676046420423018998
1-Star Tyrogue
Lv. 15-20
Gender: Random
Ability: A3
Selection Probabilities:
1-Star Desired: 35%
Drops:
100% TR21 Reversal
100% TR56 Aura Sphere
View nestDistPrettyShield.txt
Nest ID: 1721953670860364124
1-Star Gigantamax Snorlax
Lv. 17
Dynamax Level: 1
Dynamax Boost: 1.4x
Moves:
- Tackle
- Bite
- Lick
- Defense Curl
You can’t perform that action at this time.