Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Castellucci ryancdotorg

View GitHub Profile
View sav.c
/* Copyright ©2022 Ryan Castellucci, some rights reserved.
* Written using code for `tee` from GNU coreutils as refrence.
* I stand by my signature of https://rms-open-letter.github.io/
* Licensed GPLv2, because I did literally copy things from `tee`.
* 🏳️‍⚧️ */
#include <stdio.h>
#include <signal.h>
#include <string.h>
#include <stdbool.h>
View webmaster_www_sec_gov.key
# Originator-Name: webmaster@www.sec.gov
# Originator-Key-Asymmetric: MFgwCgYEVQgBAQICAf8DSgAwRwJAW2sNKK9AVtBzYZmr6aGjlWyK3XmZv3dTINenTWSM7vrzLADbmYQaionwg5sDW3P6oaM5D3tdezXMm7z1T+B+twIDAQAB
-----BEGIN RSA PRIVATE KEY-----
MIIBNwIBAAJAW2sNKK9AVtBzYZmr6aGjlWyK3XmZv3dTINenTWSM7vrzLADbmYQa
ionwg5sDW3P6oaM5D3tdezXMm7z1T+B+twIDAQABAkABRr5ZShEY5TInM7ENwv74
sBpEO1VlMfJMLBae4v+AuqWY84VVD5p289Aj/Nqr+TLDxIlv6tMutm5t7Mkam8b5
AiBmPveycBH/yZ4E/lx8ERfchGLS7Q/hX2ttFS/RT4PpiwIhAOTjxRg2VWt0dqpj
HMUrnsdkO0452SGWuPypvl/Drq0FAiAvyi6sUIWZMPuTCfDgbHzirV4jiHprtNXZ
XpXDF49okQIgQ97KLbDGyXMiUMnM2SZjEYrGDx8WJGCV/82xdqIGpKUCIFrHwky1
ZIFMteKResE2jlw4TLhCmDrq+sxqkOMpcV96
View alt_recipe_names.json
{
"/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_AdheredIronPlate": "Alternate: Adhered Iron Plate",
"/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_BoltedFrame": "Alternate: Bolted Frame",
"/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CoatedCable": "Alternate: Coated Cable",
"/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CoatedIronCanister": "Alternate: Coated Iron Canister",
"/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CoatedIronPlate": "Alternate: Coated Iron Plate",
"/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CokeSteelIngot": "Alternate: Coke Steel Ingot",
"/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CopperAlloyIngot": "Alternate: Copper Alloy Ingot",
"/Game/FactoryGame/Recipes/AlternateRecipes/New_Update3/Recipe_Alternate_CopperRotor": "Alternate: Copper Rotor",
"/Game/FactoryGame/Recipes/AlternateRec
View satisfactorsync.py
#!/usr/bin/env python3
from sys import argv, stderr, stdout, version_info
from functools import partial
eprint = partial(print, file=stderr)
import io
import zlib
import struct
import argparse
@ryancdotorg
ryancdotorg / allsum.c
Created Apr 11, 2022
simple command line tool to hash a file with every digest algorithm openssl supports
View allsum.c
// cc -O2 -Wall -Wextra -pedantic allsum.c -lcrypto -o allsum
#define _GNU_SOURCE
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#include <ctype.h>
@ryancdotorg
ryancdotorg / private.conf
Created Mar 2, 2022
anti-bot nginx snippet
View private.conf
location ~ ^/private/.*[.]html$ {
try_files /$d_pelican$uri /$d_pelican$uri/index.html /_web$uri @tryredir;
# can check $request_filename
set $h_robots "noindex, nofollow, noarchive, nosnippet, none";
expires 5m;
max_ranges 0;
header_filter_by_lua_block {
local pcre = require "pcre"
if ngx.var.http_accept_language == nil then
return ngx.exit(403)
View massblock.py
#!/usr/bin/env python3
import os
import sys
import json
import yaml
import fileinput
import datetime
from dateutil.parser import parse as datetime_parse
@ryancdotorg
ryancdotorg / git_io_open_redirects.txt
Last active Dec 28, 2021
deliberate open redirects on github.io being abused via the git.io shortener
View git_io_open_redirects.txt
# see also https://gist.github.com/ryancdotorg/27626d8b9c6093c873f1978b614292d6
20549 https://mabbs.github.io/jump.html
9153 https://webassets.github.io/blog/index.html
9000 https://obdio.github.io/obdio/index.html
8859 https://wpaged.github.io/blog3/author.html
8842 https://wpyuel.github.io/ddwblog.github.io/index10.html
8170 https://kalagxw.github.io/blog/project-details.html
8062 https://luaxu.github.io/blog/travel.html
8058 https://c1ke.github.io/index.html
8055 https://maxslin.github.io/contact.html
@ryancdotorg
ryancdotorg / decrypt.py
Created Dec 23, 2021
Decrypt firmware images for (some) EnGenius devices
View decrypt.py
#!/usr/bin/env python3
import sys
key = b'\xac\x78\x3c\x9e\xcf\x67\xb3\x59'
filename = sys.argv[1]
def decrypter(reference):
n = len(key)
@ryancdotorg
ryancdotorg / builder.sh
Last active Jun 27, 2022
Script to statically cross compile various useful binaries (dropbear, socat, rsync, rpcapd, tcpdump, openssl, zstd) using musl-libc via musl.cc toolchains,
View builder.sh
#!/bin/bash
# From https://gist.github.com/ryancdotorg/84275935f0b82578d8c222e2e915fc78
set -eo pipefail
set -x
SOCAT_VERSION=1.7.4.3
NCURSES_VERSION=6.3
READLINE_VERSION=8.1
OPENSSL_VERSION=1.1.1n