make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / user-tools / digasn
blob8eabe5393bc0c7b522e96dc15aad8b7902c3a824
1 #!/bin/bash
3 true <<EOF
4 =pod
6 =head1 NAME
8 digasn - Query Autonom System Number (ASN) from DNS
10 =cut
12 EOF
15 if [ "$1" -gt 0 ] 2>/dev/null
16 then
17 dig +short txt AS$1.asn.cymru.com
18 else
19 dig +short txt $(tr . "\n" <<<"$1" | tac | tr "\n" .)origin.asn.cymru.com