MaxLengthOfURL=72
-# AWStats can include a link to WhoIs database on all hostnames. For this, you
-# must set ShowLinksToWhoIs to 1. Warning, a such feature depends on next
-# parameter (LinksForWhoIs) and on WhoIs server exhaustivity and availability.
+# AWStats can include a link to WhoIs database on hostnames/ip. For this, you
+# must set ShowLinksToWhoIs to 1. Warning, a such feature depends on two next
+# parameters (LinksToWhoIs and LinksToIPWhoIs) and on WhoIs server
+# exhaustivity and availability.
# For this reason, this feature can't be a reliable feature.
# Possible values: 1 or 0
# Default: 0
ShowLinksToWhoIs=0
-# Set here the link used to point to Internet WhoIs database.
+# Set here the link used to point to Internet WhoIs database for hostnames.
# This parameter is not used if ShowLinksToWhoIs is 0.
# Default: "http://www.whois.net/search.cgi2?str="
-# Example: "http://www.netsol.com/cgi-bin/whois/whois?SearchType=all&STRING="
# Example: "http://www.ripe.net/perl/whois?form_type=simple&searchtext="
-# Example: "http://www.arin.net/cgi-bin/whois.pl?queryinput="
+# Example: "http://ws.arin.net/cgi-bin/whois.pl?queryinput="
#
LinksToWhoIs="http://www.whois.net/search.cgi2?str="
+# Set here the link used to point to Internet WhoIs database for ip addresses.
+# This parameter is not used if ShowLinksToWhoIs is 0.
+# Default: "http://ws.arin.net/cgi-bin/whois.pl?queryinput="
+# Example: "http://ws.arin.net/cgi-bin/whois.pl?queryinput="
+#
+LinksToIPWhoIs="http://ws.arin.net/cgi-bin/whois.pl?queryinput="
+
+
# You can put here HTML code that will be added at the top of AWStats reports.
# Default: ""
#
(2,1,1,1,1,1);
use vars qw/
$DirLock $DirCgi $DirData $DirIcons $DirLang $AWScript $ArchiveFileName
-$AllowAccessFromWebToFollowingIPAddresses $HTMLHeadSection $HTMLEndSection $LinksToWhoIs
+$AllowAccessFromWebToFollowingIPAddresses $HTMLHeadSection $HTMLEndSection $LinksToWhoIs $LinksToIPWhoIs
$LogFile $LogFormat $LogSeparator $Logo $LogoLink $StyleSheet $WrapperScript $SiteDomain
/;
($DirLock, $DirCgi, $DirData, $DirIcons, $DirLang, $AWScript, $ArchiveFileName,
-$AllowAccessFromWebToFollowingIPAddresses, $HTMLHeadSection, $HTMLEndSection, $LinksToWhoIs,
+$AllowAccessFromWebToFollowingIPAddresses, $HTMLHeadSection, $HTMLEndSection, $LinksToWhoIs, $LinksToIPWhoIs,
$LogFile, $LogFormat, $LogSeparator, $Logo, $LogoLink, $StyleSheet, $WrapperScript, $SiteDomain)=
-("","","","","","","","","","","","","","","","","","","");
+("","","","","","","","","","","","","","","","","","","","");
use vars qw/
$color_Background $color_TableBG $color_TableBGRowTitle
$color_TableBGTitle $color_TableBorder $color_TableRowTitle $color_TableTitle
if ($param =~ /^MaxLengthOfURL/) { $MaxLengthOfURL=$value; next; }
if ($param =~ /^ShowLinksToWhoIs/) { $ShowLinksToWhoIs=$value; next; }
if ($param =~ /^LinksToWhoIs/) { $LinksToWhoIs=$value; next; }
+ if ($param =~ /^LinksToIPWhoIs/) { $LinksToIPWhoIs=$value; next; }
if ($param =~ /^HTMLHeadSection/) { $HTMLHeadSection=$value; next; }
if ($param =~ /^HTMLEndSection/) { $HTMLEndSection=$value; next; }
if ($param =~ /^BarWidth/) { $BarWidth=$value; next; }
#--------------------------------------------------------------------
# Function: Write a HTML cell with a WhoIs link to parameter
-# Parameters: Key to used as WhoIs target
-# Input: $LinksToWhoIs
+# Parameters: Key to used as WhoIs target
+# Input: $LinksToWhoIs $LinksToIPWhoIs
# Output: None
-# Return: String YYYYMMDDHHMMSS
+# Return: None
#--------------------------------------------------------------------
sub ShowWhoIsCell {
my $keyurl=shift;
my $keyforwhois;
- if ($keyurl =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
- # $keyforwhois=$key;
+ my $linkforwhois;
+ if ($keyurl =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { # IP address
+ $keyforwhois=$keyurl;
+ $linkforwhois="$LinksToIPWhoIs";
+ }
+ else { # Hostname
+ $keyurl =~ /(\w+\.\w+)$/;
+ $keyforwhois=$1;
+ $linkforwhois="$LinksToWhoIs";
}
- else { $keyurl =~ /(\w+\.\w+)$/; $keyforwhois=$1; }
print "<td>";
- if ($keyforwhois) { print "<a href=\"$LinksToWhoIs$keyforwhois\" target=awstatswhois>?</a>"; }
+ if ($keyforwhois && $linkforwhois) { print "<a href=\"$linkforwhois$keyforwhois\" target=awstatswhois>?</a>"; }
else { print " " }
print "</td>";
}