diff options
author | epoch <epoch@hacking.allowed.ano> | 2017-03-09 23:48:00 +0000 |
---|---|---|
committer | epoch <epoch@hacking.allowed.ano> | 2017-03-09 23:48:00 +0000 |
commit | bce2a14ea9e2145e7ef28725b3572321188e8ee9 (patch) | |
tree | 2eeb6f6c1412f0b20272880ff0369652f957cdff /contrib | |
parent | 27dc57b3eec41b238fab67a7d87cd697772356f7 (diff) | |
download | resdb-bce2a14ea9e2145e7ef28725b3572321188e8ee9.tar.gz resdb-bce2a14ea9e2145e7ef28725b3572321188e8ee9.zip |
LOTS of shit.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/anycast.ano/zone.txt | 4 | ||||
-rwxr-xr-x | contrib/whoisd/whoisd.pl | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/contrib/anycast.ano/zone.txt b/contrib/anycast.ano/zone.txt index 8cfbb68..8ae55a2 100644 --- a/contrib/anycast.ano/zone.txt +++ b/contrib/anycast.ano/zone.txt @@ -1,2 +1,2 @@ -anycast.ano | 1.78.69.80 -ns.anycast.ano | 1.78.69.53 +anycast.ano | 21.78.0.80 +ns.anycast.ano | 21.78.0.53 diff --git a/contrib/whoisd/whoisd.pl b/contrib/whoisd/whoisd.pl index 3ef38e0..c056395 100755 --- a/contrib/whoisd/whoisd.pl +++ b/contrib/whoisd/whoisd.pl @@ -125,7 +125,7 @@ sub ASN_lookup { } -# IPv4 addresses +# IPv4 addresses #this checks all dirs in the ip dir. so, 1., 2., and 21. (15) sub IPv4_lookup { if($QUERY =~ m/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/) { printf "%% IP section for %s\n", $QUERY unless $HACK; @@ -204,7 +204,7 @@ sub IPv6_lookup { } } -sub user_lookup { +sub user_based_lookups { printf "%% user section for '%s'\n", $QUERY unless $HACK; chdir("$RESDB/db/usr") || die "%% error"; @@ -230,10 +230,9 @@ sub user_lookup { } chdir("$RESDB/db/ip") || die "%% error"; my $merp; - foreach(split(/\n/,`grep '^$QUERY\$' */*/*/owner | cut -d/ -f1-3`)) { - $merp=`cat $_/cidr`; - chomp $merp; - printf "%-20s %s\n", "cidr" . ":", $merp; + foreach(split(/\n/,`grep '^$QUERY\$' */*/*/owner | cut -d/ -f1-3 | xargs printf '%s/cidr\n' | xargs cat | uniq`)) { + chomp $_; + printf "%-20s %s\n", "cidr" . ":", $_; } foreach(split(/\n/,`grep -i -e "^$QUERY\$" "$RESDB/db/dom"/*/*/owner`)) { @@ -275,4 +274,5 @@ ASN_lookup($user); IPv4_lookup($user); domain_lookup($user); IPv6_lookup($user); -#user_lookup(); +$QUERY=$user; +user_based_lookups($user); |