Skip to content

Instantly share code, notes, and snippets.

View ndeadly's full-sized avatar

ndeadly

  • Germany
  • 08:05 (UTC +01:00)
View GitHub Profile
@ndeadly
ndeadly / switch2_input_viewer.py
Last active October 23, 2025 18:01
A python script for connecting Nintendo Switch 2 controllers, viewing their input data and sending commands to the controller
import os
import sys
import time
import struct
import asyncio
import platform
import pickle
from bleak import BleakScanner, BleakClient
from PyQt5 import QtCore, QtGui, QtWidgets
@ndeadly
ndeadly / fix_noreturn_funcs.py
Created November 8, 2024 10:27
IDA script to automate locating nn::diag::detail::VAbortImpl and nn::detail::UnexpectedDefaultImpl functions and marking them __noreturn
import ida_funcs
import ida_search
import ida_auto
import idautils
# Find the bounds of the program
segments = list(idautils.Segments())
MODULE_START_ADDR = min(segments)
MODULE_END_ADDR = get_segm_end(max(segments))
@ndeadly
ndeadly / dump_brcm_patchram.py
Created November 5, 2024 21:32
IDA script for dumping the broadcom patchram data from the bluetooth module of Nintendo Switch firmware
import os
import ida_funcs
import ida_search
import idautils
BASE_ADDR = 0x7100000000
def search_imm(value):
@ndeadly
ndeadly / sysmodules.txt
Last active August 27, 2025 02:18
Title IDs for Nintendo Switch sysmodules and system applets
/* Nintendo sysmodules */
0100000000000000 fs
0100000000000001 ldr
0100000000000002 ncm
0100000000000003 pm
0100000000000004 sm
0100000000000005 boot
0100000000000006 usb
0100000000000007 tma.stub/htc.stub
0100000000000008 boot2