Skip to content

Instantly share code, notes, and snippets.

@kynex7510
kynex7510 / make_lfcs.py
Created July 28, 2025 19:32
Build and sign LocalFriendCodeSeed_B files
"""
make_lfcs.py
Build and sign LocalFriendCodeSeed_B files.
- Kynex7510
"""
from cryptography.hazmat.primitives.asymmetric import rsa, padding
from cryptography.hazmat.primitives import hashes
RETAIL_MODULO = [
@kynex7510
kynex7510 / make_secureinfo.py
Last active July 28, 2025 19:31
Build and sign SecureInfo_A files
"""
make_secureinfo.py
Build and sign SecureInfo_A files.
- Kynex7510
"""
from cryptography.hazmat.primitives.asymmetric import rsa, padding
from cryptography.hazmat.primitives import hashes
RETAIL_MODULO = [
@kynex7510
kynex7510 / libn3ds_qtmram.c
Created July 23, 2025 15:15
libn3ds qtmram
// pdn.c: move #ifdef CORE123_INIT after the socmode code, and comment the #else code.
// mmu.c
mmuMapSections(QTM_RAM_BASE, QTM_RAM_BASE, 4, true, PERM_PRIV_RW_USR_NA, 0, true, ATTR_NORM_WRITE_BACK_ALLOC);
@kynex7510
kynex7510 / libn3ds_stereoscopic_3d.c
Last active July 23, 2025 14:52
libn3ds stereoscopic 3D
// Common expander presets used by the QTM sysmodule.
static const u16 g_ExpanderPresetsHigh[14] = {
0x1C0F,
0x181F,
0x103F,
0x107E,
0x10FC,
0x11F8,
0x13F0,
0x17E0,
@kynex7510
kynex7510 / main.c
Created June 21, 2025 13:32
news_oob
#include <3ds.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define INDEX_READ_BASE (0x12F348 + 0x2BD4)
#define MEMCPY_DST_BASE (0x12F348 + 0x14)
static Result NEWS_SetNotificationHeaderOther(u32 ID, void* buffer, size_t size) {
EXEFS_SECTIONS = [
".text",
".ro",
".rw"
]
def align_block(v: int) -> int:
return v + 15 & ~(15)
def make_name(data: bytes) -> str:
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives import hashes, hmac
# https://www.psdevwiki.com/ps4/Keys#PS4-PS5_USB_Extended_Storage_Key
KEY1 = bytes([0x72, 0x13, 0x19, 0x74, 0x52, 0xC6, 0xCC, 0x7E, 0xC8, 0xA3, 0xC0, 0x6C, 0x3E, 0x22, 0xF9, 0x1A])
KEY2 = bytes([0x76, 0x17, 0xB6, 0xE7, 0xA9, 0x73, 0x60, 0xFC, 0x4C, 0x67, 0xBF, 0x38, 0xD0, 0x7F, 0xD7, 0x2D])
def read_sector(path: str, index: int) -> bytes:
with open(path, "rb") as f:
f.seek(index * 0x200, 0)
@kynex7510
kynex7510 / susmodules.txt
Last active November 25, 2024 13:25
List of sysmodule reimplementations
sm: https://github.com/LumaTeam/Luma3DS/tree/master/sysmodules/sm
fs: NA
pm: https://github.com/LumaTeam/Luma3DS/tree/master/sysmodules/pm
loader: https://github.com/LumaTeam/Luma3DS/tree/master/sysmodules/loader
pxi: https://github.com/LumaTeam/Luma3DS/tree/master/sysmodules/pxi
am: https://github.com/ZeroSkill1/3ds_am
camera: NA
cfg: https://github.com/luigoalma/3ds_cfg
codec: NA
dsp: NA
@kynex7510
kynex7510 / runner.bat
Last active August 29, 2022 10:35
IDA Pro Wine Runner
// wine "/path/to/runner.bat" "/path/to/ida(64).exe" %u
@set PATH=%PATH%;.\python3\
@set PYTHONPATH=.\python3
@start /unix %*
@kynex7510
kynex7510 / android_find_apps.py
Created June 25, 2022 08:09
Find android app paths
import subprocess
def get_encoded_paths():
cmd = ['adb', 'shell', 'su', '-c', '"ls /data/app"']
pipe = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
stdout, _ = pipe.communicate()
encoded_paths = stdout.decode().split('\n')
return encoded_paths
def get_pkg_path(path: str):