Skip to content

Instantly share code, notes, and snippets.

View PlayEvent.py
#!/usr/bin/env python3
import os
import struct
import sys
from datetime import datetime
# https://github.com/switchbrew/libnx/blob/master/nx/include/switch/services/pdm.h#L78
with open('PlayEvent.dat', 'rb') as fin:
magic = struct.unpack('i', fin.read(4))[0]
View system_update.sh
#!/usr/bin/env bash
HACTOOL=./hactool.exe
UPDATES=`find . ! -name . -type d`
for updates in $UPDATES; do
updates=`basename $updates`
NCA=`find $updates -name '*.cnmt.nca'`
for nca in $NCA; do
TITLEID=`$HACTOOL -k keys.txt -t nca --listromfs $nca | grep "Title ID:" | grep 0100000000000809 | tr -s ' ' | cut -d' ' -f3`
@garoxas
garoxas / CDNSP-GUI-Bob.py
Last active Oct 22, 2020
add Required FW Version check
View CDNSP-GUI-Bob.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Credit:
# Thanks to Zotan (DB and script), Big Poppa Panda, AnalogMan, F!rsT-S0uL
# Design inspiration: Lucas Rey's GUI (https://darkumbra.net/forums/topic/174470-app-cdnsp-gui-v105-download-nsp-gamez-using-a-gui/)
# Thanks to the developer(s) that worked on CDNSP_Next for the cert fix!
# Thanks to the help of devloper NighTime, kvn1351, gizmomelb, theLorknessMonster
# CDNSP - GUI - Bob - v4
import sys
import time
@garoxas
garoxas / extractnsp.py
Last active Oct 22, 2020
Extract XML from NSP
View extractnsp.py
#!/usr/bin/env python
import argparse
import os
import struct
import sys
import xml.etree.ElementTree as etree
parser = argparse.ArgumentParser()
parser.add_argument('file', help='NSP file')