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))
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
},
View boot2_5x.json
{
"name" : "boot2.ProdBoot",
"title_id" : "0x0100000000000008",
"title_id_range_min" : "0x0100000000000008",
"title_id_range_max" : "0x0100000000000008",
"main_thread_stack_size" : "0x4000",
"main_thread_priority" : 48,
"default_cpu_id" : 3,
"process_category" : 0,
"pool_partition" : 2,
@SciresM
SciresM / quest_enc_set.py
Created May 30, 2018
Encounter Set printer for Pokemon Quest
View quest_enc_set.py
def print_set(p):
ind_lvl = 0
def printf(s, lvl = ind_lvl):
s = '%s%s' % (' ' * ind_lvl, s)
print s
try:
outf.write('%s\n' % s)
except:
pass
printf('Pack: %s' % p)
View switch_cert.py
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
You can’t perform that action at this time.