PMbwmon bandwidth monitor: can specify which interfaces to watch, also supporting...
[hband-tools.git] / crawler-bin / whoishu
blob27dd5e18a966e3338b2f7091081dab6a2b0c4719
1 #!/bin/bash
4 domain_tld=$1
5 domain=${domain_tld%.*}
6 expr "$domain" : ".*\\." >/dev/null && tld=${domain_tld##*.}
8 url="http://www.domain.hu/domain/domainsearch/"
9 request="domain=$domain&tld=${ltd:-hu}"
11 curl -s "$url?$request" \
12 | iconv -f latin2 -t utf8 \
13 | perl -ne '
14 if(/ns=([0-9a-z\.]+)/) {
15 print $1."\t";
17 if(/class=list2/) {
18 s/(<[^>]+>)+/\t/g;
19 s/^\s+|\s+$//g;
20 /--(.*)$/;
21 $_=$1;
22 s/^\s+|\s+$//g;
23 print $_;
26 echo # NL
28 #curl -s "$url?$request"