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 ( | |
"github.com/miekg/dns" | |
"flag" | |
"github.com/miekg/pcap" | |
"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
package main | |
import ( | |
"fmt" | |
"github.com/miekg/dns" | |
"math/rand" | |
"os" | |
"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
#!/bin/zsh | |
# Retrieve RFC and/or drafts. By Miek Gieben (c) 2012, licensed under the GPL v2. | |
# RFC urls | |
# http://tools.ietf.org/pdf/rfc5737 | |
# http://tools.ietf.org/rfc/rfc5737.txt | |
# Draft urls | |
# http://tools.ietf.org/id/draft-gieben-auth-denial-of-existence-dns-00.txt | |
# http://tools.ietf.org/pdf/draft-gieben-auth-denial-of-existence-dns-00.txt |
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
% ./q nul\\000gap.test.globnix.net | |
;; opcode: QUERY, status: NOERROR, id: 4386 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 6 | |
;; QUESTION SECTION: | |
;nul\000gap.test.globnix.net. IN A | |
;; ANSWER SECTION: | |
nul\000gap.test.globnix.net. 60 IN A 192.0.2.10 |
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/zsh | |
filename=$1;shift | |
case $filename in | |
*_test.go) go test "$@";; | |
*) go build "$@";; | |
esac |
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 ( | |
"encoding/json" | |
"github.com/miekg/bitradix" | |
"log" | |
"net" | |
"os" | |
"reflect" | |
) |
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
for tld in $(awk ' { print $1 }' root-zone | egrep '^[a-z0-9-]+\.$' | sort -u); do | |
echo -n $tld: | |
if dig +dnssec DNSKEY $tld | grep -q RRSIG; then | |
echo -n DNSSEC: | |
else | |
echo -n dnssec: | |
fi | |
echo $(dig +noall +answer ${tld}cc.jpmens.net txt | awk ' { print $5" "$6" "$7" "$ |
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 | |
set -e | |
getopts "s" show && shift | |
if [[ $show == "s" ]]; then | |
while read line; do | |
hex="$(echo $line | od -N4 -x | head -1)" | |
byte=(${hex}) | |
if [[ ${byte[1]} == "4b50" && ${byte[2]} == "0403" ]]; then | |
break | |
fi |
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
# kernel lock up? | |
[ 1778.501345] WARNING: CPU: 3 PID: 6455 at /build/linux-jHWiKd/linux-3.13.0/kernel/watchdog.c:24 | |
5 watchdog_overflow_callback+0x9c/0xd0() | |
[ 1778.501347] Watchdog detected hard LOCKUP on cpu 3 | |
% ps aux|grep '[6]455' | |
miek 6455 16.3 0.2 145652 7784 pts/6 R 08:01 0:45 ./slot | |
% kill -9 6455 | |
% ps aux|grep '[6]455' | |
miek 6455 15.0 0.2 145652 7784 pts/6 R 08:01 0:45 ./slot |
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
Fruit | Price | Advantages | | |
--------------------------------------- | |
Bananas | $1.34 | built-in wrapper | | |
Apples | $0.10 | cures scurvy | | |
Bananas | $0.73 | scurvy | | |
Oranges | $2.10 | cures scurvy | |