Mercurial > hg > anonet-resdb
comparison contrib/whoisd/whoisd.pl @ 1214:7fa47f376c41 draft
seeing if this change to the whoisd will make it show IP6 registrations based on username
author | epochqwert <epoch@hacking.allowed.org> |
---|---|
date | Sun, 22 Jul 2018 09:12:56 +0000 |
parents | 4e77dfbee7e7 |
children | b8624e57fd96 |
comparison
equal
deleted
inserted
replaced
1213:4204875410e0 | 1214:7fa47f376c41 |
---|---|
87 } | 87 } |
88 | 88 |
89 sub get_user_from_IPv6 { | 89 sub get_user_from_IPv6 { |
90 chdir("$RESDB/db/ip6") || die "%% error. no resdb/db/ip6\n"; | 90 chdir("$RESDB/db/ip6") || die "%% error. no resdb/db/ip6\n"; |
91 $d=$_[0]; | 91 $d=$_[0]; |
92 print "$d"; | 92 #print "$d"; |
93 $d =~ s/[^0-9a-f]//gi; | 93 $d =~ s/[^0-9a-f]//gi; |
94 $d =~ tr/a-z/A-Z/; | 94 $d =~ tr/a-z/A-Z/; |
95 foreach(split(//,$d)) { | 95 foreach(split(//,$d)) { |
96 $d=$_; | 96 $d=$_; |
97 chdir($d); | 97 chdir($d); |
233 foreach(split(/\n/,`grep '^$QUERY\$' */*/*/owner | cut -d/ -f1-3 | xargs printf '%s/cidr\n' | xargs cat | uniq`)) { | 233 foreach(split(/\n/,`grep '^$QUERY\$' */*/*/owner | cut -d/ -f1-3 | xargs printf '%s/cidr\n' | xargs cat | uniq`)) { |
234 chomp $_; | 234 chomp $_; |
235 printf "%-20s %s\n", "cidr" . ":", $_; | 235 printf "%-20s %s\n", "cidr" . ":", $_; |
236 } | 236 } |
237 | 237 |
238 chdir("$RESDB/db/ip6") || die "%% error"; | |
239 foreach(split(/\n/,`grep '^$QUERY\$' -r * | cut -d/ -f1-16 | xargs printf '%s/cidr\n' | xargs cat | uniq`)) { | |
240 chomp $_; | |
241 printf "%-20s %s\n", "cidr" . ":", $_; | |
242 } | |
243 | |
238 foreach(split(/\n/,`grep -i -e "^$QUERY\$" "$RESDB/db/dom"/*/*/owner`)) { | 244 foreach(split(/\n/,`grep -i -e "^$QUERY\$" "$RESDB/db/dom"/*/*/owner`)) { |
239 $out = $_; | 245 $out = $_; |
240 $out =~ s/.*\/db\/dom\/(.+?)\/(.+?)\/owner.*/\2\.\1/; | 246 $out =~ s/.*\/db\/dom\/(.+?)\/(.+?)\/owner.*/\2\.\1/; |
241 if ($out ne "") { #fix this comparison. | 247 if ($out ne "") { #fix this comparison. |
242 printf "%-20s %s\n", "domain" . ":", $out; | 248 printf "%-20s %s\n", "domain" . ":", $out; |