Skip to content

Instantly share code, notes, and snippets.

SciresM

Block or report user

Report or block SciresM

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fe_heroes_message_xor.py
def fe_xor(string, key):
'''Decrypts a Fire Emblem Heroes string using a specified key.'''
if type(key) == str:
key = map(ord, key)
cur_k = (key[0] + key[1]) & 0xFF
crypt = ''
for i in range(len(string)):
cur_k ^= key[i % len(key)]
crypt += chr((cur_k ^ ord(string[i])) or ord(string[i]))
return crypt
@SciresM
SciresM / ida_fireemblem_symbols.py
Last active Feb 15, 2017
Get full symbols for your Fire Emblem If/Fates IDB
View ida_fireemblem_symbols.py
import idaapi
import idautils
import idc
import struct
def do_rename(eaaddr, name):
idc.MakeCode(eaaddr)
idc.MakeFunction(eaaddr)
idc.MakeNameEx(eaaddr, name, idc.SN_NOWARN)
View parse_pelago.py
import os, sys
from struct import unpack as up
pkm_lst = ['Egg', 'Bulbasaur', 'Ivysaur', 'Venusaur', 'Charmander', 'Charmeleon', 'Charizard', 'Squirtle', 'Wartortle', 'Blastoise', 'Caterpie', 'Metapod', 'Butterfree', 'Weedle', 'Kakuna', 'Beedrill', 'Pidgey', 'Pidgeotto', 'Pidgeot', 'Rattata', 'Raticate', 'Spearow', 'Fearow', 'Ekans', 'Arbok', 'Pikachu', 'Raichu', 'Sandshrew', 'Sandslash', 'Nidoran-F', 'Nidorina', 'Nidoqueen', 'Nidoran-M', 'Nidorino', 'Nidoking', 'Clefairy', 'Clefable', 'Vulpix', 'Ninetales', 'Jigglypuff', 'Wigglytuff', 'Zubat', 'Golbat', 'Oddish', 'Gloom', 'Vileplume', 'Paras', 'Parasect', 'Venonat', 'Venomoth', 'Diglett', 'Dugtrio', 'Meowth', 'Persian', 'Psyduck', 'Golduck', 'Mankey', 'Primeape', 'Growlithe', 'Arcanine', 'Poliwag', 'Poliwhirl', 'Poliwrath', 'Abra', 'Kadabra', 'Alakazam', 'Machop', 'Machoke', 'Machamp', 'Bellsprout', 'Weepinbell', 'Victreebel', 'Tentacool', 'Tentacruel', 'Geodude', 'Graveler', 'Golem', 'Ponyta', 'Rapidash', 'Slowpoke', 'Slowbro', 'Magnemite', 'Magneton', 'Fa
View hfs0.py
from struct import unpack as up
import sys, os, hashlib
dirs, files = None, None
def read_at(fp, off, len):
fp.seek(off)
return fp.read(len)
def read_u8(fp, off):
View package1.py
from struct import unpack as up, pack as pk
from binascii import unhexlify as uhx, hexlify as hx
from Crypto.Cipher import AES
from Crypto.Util import Counter
import sys
pk11key = uhx('') # Insert key here.
def string_to_ctr(ctr):
return Counter.new(128, initial_value=int(hx(ctr), 16))
@SciresM
SciresM / switch_romfs.py
Created Jul 19, 2017
Switch RomFS (IStorage) -> Files
View switch_romfs.py
from struct import unpack as up
import sys, os
dirs, files = None, None
def read_at(fp, off, len):
fp.seek(off)
return fp.read(len)
def read_u8(fp, off):
View launch_pegaswitch_fake_news.json
{
"version": {
"format": 1,
"semantics": 1
},
"news_id": 10000,
"published_at": 0,
"pickup_limit": 1209600,
"priority": 50,
"deletion_priority": 0,
View ParseKipConfiguration.c
int cJSON_GetU8(const cJSON *obj, const char *field, u8 *out) {
const cJSON *config = cJSON_GetObjectItemCaseSensitive(obj, field);
if (cJSON_IsNumber(config)) {
*out = (u8)config->valueint;
return 1;
} else {
fprintf(stderr, "Failed to get %s (field not present).\n", field);
return 0;
}
}
View package1_4.0.0.idc
#define UNLOADED_FILE 1
#include <idc.idc>
static main(void)
{
// set 'loading idc file' mode
set_inf_attr(INF_GENFLAGS, INFFL_LOADIDC|get_inf_attr(INF_GENFLAGS));
GenInfo(); // various settings
Segments(); // segmentation
Enums(); // enumerations
@SciresM
SciresM / Factory_2.0.0-13 (2.3.0 consoles).json
Last active Apr 25, 2018
Known Switch Factory Firmware Revisions
View Factory_2.0.0-13 (2.3.0 consoles).json
{
"0100000000000807": {
"0": {
"nca": "dafd00b9ad3b05181f71b7e970b371ed.nca",
"size": 4096
},
"2": {
"nca": "bc6b7d53a47ed1598efc7966a3772e8c.nca",
"size": 90112
},
You can’t perform that action at this time.