This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0100000000000807": { | |
"0": { | |
"nca": "dafd00b9ad3b05181f71b7e970b371ed.nca", | |
"size": 4096 | |
}, | |
"2": { | |
"nca": "bc6b7d53a47ed1598efc7966a3772e8c.nca", | |
"size": 90112 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from struct import unpack as up | |
import sys, os, hashlib | |
import zstandard as zstd | |
dirs, files = None, None | |
def read_at(fp, off, len): | |
fp.seek(off) | |
return fp.read(len) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, os, struct, zlib | |
from Crypto.Cipher import AES | |
def u32(x): | |
return (x & 0xFFFFFFFF) | |
KEY_MATERIAL = 'e413645fa69cafe34a76192843e48cbd691d1f9fba87e8a23d40e02ce13b0d534d10301576f31bc70b763a60cf07149cfca50e2a6b3955b98f26ca84a5844a8aeca7318f8d7dba406af4e45c4806fa4d7b736d51cceaaf0e96f657bb3a8af9b175d51b9bddc1ed475677260f33c41ddbc1ee30b46c4df1b24a25cf7cb6019794' | |
class sead_rand: | |
'''Implements Splatoon 2's mersenne random generator.''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
OlderNewer