Skip to content

Instantly share code, notes, and snippets.

View ryancdotorg's full-sized avatar

Ryan Castellucci ryancdotorg

View GitHub Profile
@ryancdotorg
ryancdotorg / builder.sh
Last active April 22, 2024 16:00
Script to statically cross compile various useful binaries (dropbear, socat, rsync, rpcapd, tcpdump, openssl, zstd) using musl-libc via musl.cc toolchains,
#!/bin/bash
# From https://gist.github.com/ryancdotorg/84275935f0b82578d8c222e2e915fc78
# built binaries at https://ryanc-musl-bins.s3.amazonaws.com/SHA256SUMS.html
set -eo pipefail
set -x
export BUILD_SCRIPT_DATE="$(date -r "$0" -Iseconds)"
PV_VERSION=1.8.5
@ryancdotorg
ryancdotorg / wzip.py
Last active April 8, 2024 14:20
Partial/streaming zip downloader
#!/usr/bin/env python3
# SPDX-License-Identifier: 0BSD or CC0-1.0 or MIT-0 or Unlicense
# Copyright (c) 2023, Ryan Castellucci, No Rights Reserved
import io, sys
import datetime
import argparse
import requests
import operator
import struct
// This will look for a form that has titles to select from a dropdown list,
// add "Mx" as an option if not already present, and mark "Mx" as active.
// WARNING: This will not work on all sites, and subtle breakage may occur
// that is not immediately obvious. Please get in touch if you have ideas
// for improvement. You need to save the URL below as a bookmark, and then
// you can select it from your bookmarks to run it on the current page.
javascript:(D=>{D.querySelectorAll("option[value^=mrs i]").forEach(N=>{for(var r=D.createElement("option"),p=N.parentNode,o=p.children,t=0;t<o.length;++t)if(/^mx/i.test(o[t].value))return o[t].selected=!0;r.value=r.innerText=N.value.replace(/rs/i,s=>"R"==s[0]?"X":"x"),p.appendChild(r),r.selected=!0})})(document)
Binary files dropbear.orig/.git/index and dropbear/.git/index differ
diff -ruN dropbear.orig/Makefile.in dropbear/Makefile.in
--- dropbear.orig/Makefile.in 2023-12-21 13:53:06.474210019 +0000
+++ dropbear/Makefile.in 2023-12-21 18:43:15.890803869 +0000
@@ -50,7 +50,7 @@
cli-authpubkey.o cli-tcpfwd.o cli-channel.o cli-authinteract.o \
cli-agentfwd.o
-CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \
+CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o common-ident.o \
RSA Private-Key: (6969 bit, 69 primes)
modulus:
01:01:57:5a:5e:73:6f:8f:02:77:e3:27:6e:c6:bd:
97:cf:32:95:de:59:a7:32:7e:64:84:e3:3e:e8:17:
f3:8c:07:5c:1e:74:7a:40:33:86:7b:45:bc:e0:b6:
c8:6c:e3:fa:5a:1c:65:18:1a:5c:fc:3c:8a:c4:f5:
6f:63:60:32:cc:cd:03:b5:c9:54:29:d5:b2:c1:24:
54:81:0b:f4:40:53:84:e5:14:2c:58:70:98:7f:36:
6b:ef:df:13:5e:8f:07:05:f1:42:25:cf:30:82:94:
9a:11:df:49:9a:76:51:ad:6e:d7:46:2d:b8:ed:39:
RSA Private-Key: (6969 bit, 69 primes)
modulus:
01:01:a2:9e:47:bc:24:44:b8:5a:6d:ee:28:5a:e0:
66:13:46:f1:b6:33:54:91:86:c2:91:1c:5e:b9:4a:
7b:0f:b8:24:86:a1:66:5a:fd:0e:59:a1:bf:e8:8f:
7a:50:29:47:d5:6e:03:c4:50:1d:ac:38:7d:c3:30:
9a:5e:07:b8:1c:21:d8:c7:d1:91:b2:59:da:0d:66:
9d:99:12:51:9d:e4:04:f4:3b:30:b4:b9:96:91:4b:
4c:6f:73:e5:09:86:ee:d2:fa:5f:a1:98:0b:ba:05:
6e:ab:4d:c9:29:a8:b7:eb:06:84:f2:c4:46:a9:cd:
RSA Private-Key: (2048 bit, 69 primes)
modulus:
00:80:1b:43:e8:2e:98:87:18:67:44:77:a8:27:d7:
47:12:ca:0d:90:67:56:ee:52:23:40:f1:cc:a2:99:
e4:bd:0e:3f:96:5e:2b:aa:72:08:30:9b:df:70:81:
e3:5a:35:43:3e:96:ab:72:1b:ba:77:21:ec:74:6c:
e6:37:66:92:d9:7a:f3:47:86:95:0d:28:ab:4a:23:
21:e0:2e:1f:16:71:eb:c1:0f:40:2d:9a:cb:ca:d9:
84:66:53:6c:d2:6a:82:9b:28:13:78:1f:7b:51:d7:
b8:1d:98:a6:1a:c1:f7:c0:5e:70:3b:fc:fb:14:23:
window.tasmota_tls_fingerprint = (_=>{
// golfed SHA1; the data to be already padded
// based on an old version of https://github.com/jbt/tiny-hashes
const raw_sha1 = u8 => {
for (var blockstart=0,
str1,
i = 0,
W = [],
A = 0x67452301,
B = 0xEFCDAB89,
#!/usr/bin/env python3
import sys
import ssl
from hashlib import sha1
# need recent pycryptodome
try:
from Crypto.PublicKey import RSA
#!/bin/bash
set -uo pipefail
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
exec /usr/bin/git "$@"
# Find the real git binary
GIT_BIN=/bin/false
SAVED_IFS="$IFS"
IFS=:
for d in $PATH
do