Skip to content

Instantly share code, notes, and snippets.

@duncm
duncm / curl-akamai-staging
Last active December 8, 2022 21:26
curl wrapper for Akamai staging network
#!/bin/bash
# curl-akamai-staging
# curl wrapper for Akamai staging network. Resolves staging edge hostnames
# for requested URLs and invokes curl with `--connect-to` so that requests
# are routed accordingly. All other arguments are passed to curl as is.
# For example:
# curl-akamai-staging -v https://http2.akamai.com/

Keybase proof

I hereby claim:

  • I am duncm on github.
  • I am duncm (https://keybase.io/duncm) on keybase.
  • I have a public key whose fingerprint is 2035 EDA7 B14D 0123 7245 184C 1C9B C0D4 D785 4F52

To claim this, I am signing this object:

@duncm
duncm / eglibc_2.13-0ubuntu13.2_2.13-0ubuntu13.2+CVE.2015.0235.diff
Created February 2, 2015 00:32
CVE-2015-0235 patch for Ubuntu 11.04 (Natty Narwhal)
diff -u eglibc-2.13/debian/changelog eglibc-2.13/debian/changelog
--- eglibc-2.13/debian/changelog
+++ eglibc-2.13/debian/changelog
@@ -1,3 +1,12 @@
+eglibc (2.13-0ubuntu13.2+CVE.2015.0235) natty-security; urgency=medium
+
+ * SECURITY UPDATE: buffer overflow in __nss_hostname_digits_dots
+ - debian/patches/any/CVE-2015-0235.diff: fix overflow in
+ nss/digits_dots.c
+ - CVE-2015-0235
@duncm
duncm / diceware.py
Last active April 3, 2018 07:37
Passphrase generator based on the Diceware method by A. G. Reinhold.
import random
import sys
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
DICEWARE_WORDLIST_URL = 'http://world.std.com/~reinhold/diceware.wordlist.asc'
BEALE_WORDLIST_URL = 'http://world.std.com/~reinhold/beale.wordlist.asc'