#!/usr/local/bin/perl #use CGI::Carp qw(fatalsToBrowser); $hostname_ver = '1.0_b2'; use Socket; my $iptext = qq~$ENV{'QUERY_STRING'}~; my $ipaddr = inet_aton("$iptext"); my $host = gethostbyaddr($ipaddr, AF_INET); $Piece1 = "http://www.whois.net/whois.cgi2?d="; $Piece2 = "http://ws.arin.net/cgi-bin/whois.pl?queryinput="; chomp $host; $HoldWho = $Piece1.$host; chomp $iptext; $referer = $ENV{'HTTP_REFERER'}; sub header { print <<"HTML"; Resolve IP HTML } sub footer { print <<"HTML"; HTML } # referer will be shown just cut and paste it here #$onlylocal ="http://www.xxxxxxxxxx.com/cgi-bin/yabb"; ###if ($referer ne $onlylocal) #{ #print "Content-type: text/html\n\n"; #&header; #print <<"HTML"; #

Local Referer Only

#HTML #&footer; #exit; #} if ($host eq ''){ print "Content-type: text/html\n\n"; &header; print <<"HTML";
Sorry No Information Returned for
$iptext
Try this: Click Here
HTML &footer; exit; } print "Content-type: text/html\n\n"; &header; print <<"HTML";

Your Requested Information

IP is $iptext
Host name is $host

Click Here to Get the WHOIS information. Click Here

refered by $referer

HTML &footer; exit; 1;