dnsbl (298B)
1 #!/bin/sh 2 3 [ -z $1 ] && echo "usage: dnsbl <ip4 addr> [service]" && exit 1 4 [ -z $2 ] && service=torexit.dan.me.uk || service="$2" 5 6 rev=$(echo "$1" | awk 'BEGIN {OFS="."; FS="."}; {print $4, $3, $2, $1}') 7 8 host "$rev.$service" | awk '{print $4}' >/dev/null || exit 1 9 10 dig +short "$rev.$service" TXT