This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file should be valid C99. | |
// Intended for use on MacOS (tested) and *BSD (untested) systems. | |
#include <err.h> | |
#include <limits.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
// gets us some compiler macros for OS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
prefix='philpennock-pgp' | |
keyid='0x4D1E900E14C1CC04' | |
progname="$(basename -- "$0")" | |
umask 0077 | |
[ -d ~/.gnupg/export ] || mkdir ~/.gnupg/export | |
cd ~/.gnupg/export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import binascii | |
with open('foo.hvif', 'wb') as out: | |
out.write(binascii.unhexlify(b''.join(open('foo.hvif.txt', 'rb').read().split()))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
# | |
# Usage: | |
# aws-instance-sshhostkeys i-deadbeef | tee -a .ssh/known_hosts | |
# FIXME: | |
# Strip trailing CR | |
# Strip trailing comment field | |
# Support Route53 entries automatically |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
# http://www.keylength.com/en/3/ -- ECRYPT II "smallest general purpose level" | |
# is 1248 bits symmetric; we're pretty stuck on RSA right now | |
: "${KEYSIZE_RSA:=1248}" | |
: "${DKIM_SIGN_DOMAINS_FILE:=/etc/exim/dkim/domains-mapping}" | |
: "${DATE:=$(date +%Y%m)}" | |
declare -r KEYSIZE_RSA DKIM_SIGN_DOMAINS_FILE DATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# BUG: "#" can not appear in a value | |
BEGIN { @INC = grep {$_ ne '.'} @INC }; | |
use warnings; | |
use strict; | |
# XXX: make these overrideable with getopt, together with "rebuild all", etc. | |
my $flat_dir = '/etc/mail/flat'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# Must be python2 for zbase32 module :( | |
# $ pip install attrs zbase32 | |
""" | |
pka: emit PKA records for key | |
Generate all PKA records for a given key, which must be on the keyring. | |
Optionally include a keyserver in the CERT/IPGP payload. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
set -eu | |
clean_here() { | |
find . -type f -execdir sh -c \ | |
'f="{}"; | |
t=$(file -hb "$f"); | |
[ "$t" = "SQLite 3.x database" ] || exit 1; | |
printf "%s/%s\n" "$(pwd)" "$f"; | |
ls -ld 2>/dev/null "$f" "${f}-journal"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"container/list" | |
"flag" | |
"fmt" | |
"os" | |
"sync" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- usr.bin/whois/whois.c.orig 2017-08-17 14:00:08.917506928 -0400 | |
+++ usr.bin/whois/whois.c 2017-08-17 14:00:28.975792449 -0400 | |
@@ -76,7 +76,7 @@ | |
#define GERMNICHOST "de.whois-servers.net" | |
#define FNICHOST "whois.afrinic.net" | |
#define DEFAULT_PORT "whois" | |
-#define WHOIS_SERVER_ID "Whois Server: " | |
+#define WHOIS_SERVER_ID "Registrar WHOIS Server: " | |
#define WHOIS_ORG_SERVER_ID "Registrant Street1:Whois Server:" | |