Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/sh
for f in *.nca; do
export NAME="$(hactool -i $f | grep "Content Type:" | cut -d":" -f2 | tr -d '[:space:]' | tr -d '[\r]')"
if [ $NAME == "Meta" ]; then
mv "$f" "${f%.nca}.cnmt.nca"
fi
done
#Imports a file with lines in the form "symbolName 0xADDRESS"
#@category Data
#@author
from ghidra.app.cmd.label import DemanglerCmd
f = askFile("Give me a file to open", "OK!")
def set_demangled_name(addr, name):
cmd = DemanglerCmd(toAddr(addr), name)
return cmd.applyTo(currentProgram, monitor), cmd.getResult()
import sys
import re
import nxo64
def main(pattern, filename):
f = nxo64.load_nxo(open(filename, 'rb'))
f.binfile.seek(0)
target_text = f.binfile.read(f.textsize)
{
"configurations": [
{
"name": "DKP aarch64",
"includePath": [
"${env:DEVKITPRO}/devkitA64/aarch64-none-elf/include",
"${env:DEVKITPRO}/devkitA64/lib/gcc/aarch64-none-elf/10.1.0/include",
"${env:DEVKITPRO}/libnx/include",
"${env:DEVKITPRO}/portlibs/switch/include"
],
#include "json.hpp"
#include <cstdio>
#include <curl/curl.h>
#include <fstream>
#include <iostream>
using json = nlohmann::json;
size_t StringWrite(const char *contents, size_t size, size_t nmemb, std::string *userp) {
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
Copyright (C) 2001-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
/*
SDL_ttf: A companion library to SDL for working with TrueType (tm) fonts
Copyright (C) 2001-2019 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it