Skip to content

Instantly share code, notes, and snippets.

@TheExpertNoob
TheExpertNoob / indexer.php
Created June 4, 2025 03:00
Scans current directory and outputs encrypted tinfoil.tfl when called. Requires phpseclib3 and composer. Adjust to your needs.
<?php
require_once 'vendor/autoload.php';
use phpseclib3\Crypt\RSA;
use phpseclib3\Crypt\AES;
use phpseclib3\Crypt\PublicKeyLoader;
// Load Tinfoil public key
$publicPem = <<<EOD
@TheExpertNoob
TheExpertNoob / CFWUpdate.md
Last active September 29, 2025 12:20
Steps to Update Nintendo Switch Custom Firmware

How to Update Switch to Latest CFW.

  1. Create a folder on your Desktop called SDCARD.
  2. Download and extract the latest Atmosphere to the folder SDCARD.
  3. Download and extract the latest Hekate to the folder SDCARD.
  4. Download and extract the latest Sys-Patch to the folder SDCARD.
  5. Search Google for THZoria firmware files. Download the one matching the supported firmare and extract to a folder called Firmware inside SDCARD.
  6. Block Ninteno Servers.
    1. Navigate to your SDCARD folder on the Desktop.
    2. Inside the atmosphere folder, create a hosts folder if it does not exist.
    3. Navigate inside this hosts folder and copy the two text files: emummc.txt and sysmmc.txt from below.
<?php
// tfl-decrypt.php requires PHP 8.5+
// Single-file upload + decrypt + return JSON
$privateKeyPath = '/var/www/private.pem'; // Configure this to the PEM format Tinfoil private key location (outside webroot).
// Simple HTML form when no POST
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
echo '<!doctype html><html><head><meta charset="utf-8"><title>TFL -> JSON</title><style>body {image-rendering: pixelated; background: url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyBvcGFjaXR5PSIwLjIiIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDgwMCA4MDAiIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PGZpbHRlciBpZD0nbm9pc2VGaWx0ZXInPjxmZVR1cmJ1bGVuY2UgdHlwZT0nZnJhY3RhbE5vaXNlJyBiYXNlRnJlcXVlbmN5PScwLjY1JyBudW1PY3RhdmVzPSczJyBzdGl0Y2hUaWxlcz0nc3RpdGNoJyAvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbHRlcj0ndXJsKCNub2lzZUZpbHRlciknIC8+PC9zdmc+"),linear-gradient(112.1deg, rgb(16, 19, 28) 11.4%, rgb(32, 38, 60) 70.2%); color: white; font-family: "Noto Sans", sans-serif; display: flex; just
import json
import argparse
import sys
KEYS_TO_KEEP = {
"clientASNDescription",
"clientCountryName",
"clientIP",
"datetime",
"userAgent",