Skip to content

Instantly share code, notes, and snippets.

View entriphy's full-sized avatar
:shipit:
looking for work!

triph entriphy

:shipit:
looking for work!
  • California
  • 11:20 (UTC -08:00)
View GitHub Profile
@rlaphoenix
rlaphoenix / windows-7-plus-build-env-for-nitro.md
Last active July 11, 2023 18:10
Windows 7+ Build Environment for Nintendo NITRO-System (Nintendo DS) compiling.

How the NZXT Hue+ works

Also applies to the NZXT Smart Device

TL; DR

Hue+ accessories use WS2812B integrated LED and controllers. Pinout is:

  • +5V (marked with arrow; corresponding wire with white stripe)
  • IN (data in)
@slightfoot
slightfoot / squircle.dart
Last active June 12, 2025 23:19
Flutter Squircle Shape
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Squircle',
home: new Scaffold(

Nintendo Switch RSA-PKCS#1 Public Key Recovery

This is a short writeup of a fun (but ultimately pretty useless) attack I implemented on the Nintendo Switch a few months ago resulting in the recovery of some otherwise unobtainable RSA public keys. Since public keys aren't private keys, this is pretty useless, apart from letting us validate some signatures on PC. Even so, the attack is a pretty cool one, so I thought I'd write it up.

Every Switch gamecart has a unique certificate (called its "CERT"), storing an RSA signature followed by some kind of unknown but unique encrypted data. I was trying to reverse how these certificates work, and the obvious first step was to try to see how they were validated. However, when I tried looking through the FileSystem (FS) module, which should be responsible for validating these certificates, I found no references to the format at all. The "CERT" magic number was nowhere to be seen, and I couldn't find an RSA modulus that validated the signatures I had. This was in

@nico-lab
nico-lab / h264_amf
Last active May 2, 2025 12:20
ffmpeg -h encoder=h264_amf
Encoder h264_amf [AMD AMF H.264 Encoder]:
General capabilities: dr1 delay hardware
Threading capabilities: none
Supported hardware devices: d3d11va d3d11va dxva2 dxva2 amf amf
Supported pixel formats: nv12 yuv420p d3d11 dxva2_vld p010le amf bgr0 rgb0 bgra argb rgba x2bgr10le rgbaf16le
h264_amf AVOptions:
-usage <int> E..V....... Encoder Usage (from -1 to 5) (default -1)
transcoding 0 E..V....... Generic Transcoding
ultralowlatency 1 E..V....... Ultra low latency usecase
lowlatency 2 E..V....... Low latency usecase
@balzss
balzss / CryptoUtil.java
Last active October 30, 2022 05:23
Utility library for RSA cryptography on Android
import android.util.Base64;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
@sashahilton00
sashahilton00 / index.js
Created June 26, 2017 15:12
Spotify Connection and DH Handshake
//Spotify Protocol Connection Demo
//N.B. Don't forget to install the dependencies
var crypto = require('crypto');
var fs = require('fs');
var net = require('net');
var protobuf = require('protocol-buffers');
var HOST = 'lon6-accesspoint-a19.ap.spotify.com';
@willurd
willurd / web-servers.md
Last active December 5, 2025 14:02
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active December 5, 2025 13:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname