#!/usr/bin/env perl # $Id: whois,v 1.14 2006/12/19 19:58:25 friedman Exp $ $^W = 1; use strict; my $whois = "jwhois"; system ("{ jwhois --version; } > /dev/null 2>&1"); if ($? != 0) { $whois = `run-next -p "$0"`; chomp $whois; } my $buf; { local ($/) = undef; open (F, "$whois @ARGV |"); $buf = ; close (F); } my @s = (# NSI/Verisign (whois.networksolutions.com) "The Data in Network Solutions.*abide by this policy.\n+", "The Data in the VeriSign Registrar.*abide by this policy.\n+", "NOTICE AND TERMS OF USE: You are not authorized.*terms at any time.\n+", "Get a FREE domain.*http://www.networksolutions.com\n+", #opensrs "The Data in the Tucows Registrar WHOIS.*DOMAIN AVAILABILITY.\n+", "The ARIN Registration Services Host.*NIPRNET Information.\n+", ".*www.nic.fr/info/whois/dbcopyright.html\n+", # whois.dotster.com preamble "The data contained in Dotster.*limitations of warranty.\n+", # whois.dotster.com postamble "Register a domain name at www.dotster.com\n+", # whois.register.com preamble "The data in Register.com.s WHOIS.*abide by these terms.\n+", # whois.register.com postamble "Register your domain name at http://www.register.com\n+", # Compuserve preamble "Access to CompuServe.s WHOIS.*you agree to these terms.\n+", # Compuserv postamble "WHOIS data is only provided.*http://domain.compuserve.com\n+", # whois.gandi.net preamble "% GANDI Registrar whois database for.*%[^\n]*\n+", # whois.enom.net "NOTICE: The expiration date.*expiration for this registration.\n+", "TERMS OF USE:.*modify these terms at any time.\n+", "The data in this whois.*abide by these terms.\nVersion[^\n]+\n+", # whois.publicinterestregistry.net "NOTICE: Access to .ORG WHOIS information.*abide by this policy.\n+", # whois.nic.cc "Whois Server Version.*-grs.com/whois/ for detailed information.\n+", "NOTICE: The expiration date.*domains[\n ]and Registrars.\n+", # whois.educause.net "\nThis Registry database contains ONLY .EDU domains..*-----\n+", # whois.namingweb.com "The data in this whois.*by these terms.\n+", ); $buf =~ s/[ \t]*\r?\n/\n/g; map { $buf =~ s/$_//s } @s; print $buf; # eof