Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/rc/iwhois

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc


rfork n
ramfs

for (i in $*){
	hget 'http://www.dnsstuff.com/tools/whois.ch?ip='^$i^'&email=on' |
		htmlfmt > /tmp/iwhois
	if ( grep -s 'Unfortunately, this domain is registered through Network Solutions' /tmp/iwhois )
		/rc/bin/iwhois $i
	if not
		sed '
			/^[#%]$/d
			/^[%#] /d
			/^$/d
			/^Found .* Looking up$/d
			/^WHOIS results for/d
			/^I was referred to /d
			/^Using [0-9]+ day old cached answer/d
			/^Generated by/d
			/^Displaying E-mail address/d
			/The Data in the Tucows Registrar/,$d
			/^--$/,$d
			/^=======$/,$d
			/^\[The following lines added by www.dnsstuff.com/,$d
		' /tmp/iwhois
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.