ipduh_intel AWStats Plugin Simple



`ipduh_intel.pm simple` is an AWStats Plugin that protects-warns you if you attempt to visit malicious referrals and helps you in accessing the IPduh Intelligence.



ipduh_intel.pm simple provides:

1)URLs through the URL Bouncer for all referrals.

2) A proper URL to URL decode for all referrals.

3) A proper URL to Demux for all IPv4 and IPv6 addresses

4) A proper URL to dnsbl for all IPv4 addresses.


simple? --because I wrote one more ipduh_intel plugin that does a lot but it is kind of complex ( hurts your eyes looking at the code ). I will post it here once I make it look better.



To install ipduh_intel.pm:

1)Put ipduh_intel.pm ( also available at http://kod.ipduh.com/lib/ipduh_intel.pm ) in your AWStats plugin Directory.

2)Add the line LoadPlugin="ipduh_intel" in the PLUGINS section of your awstats.*.conf




ipduh_intel.pm


#!/usr/bin/perl
#-----------------------------------------------------------------------------
# ipduh_intel AWStats plugin
# This plugin provides:
# a through the IPduh bouncer ( http://ipduh.com/url/bouncer ) URL for all referals --in the 'Links from an external page' section
# a link to IPduh decode ( http://ipduh.com/url/decode ) for all referals --in the 'Links from an external page' section
# a link to IPduh demux ( http://ipduh.com/demux )  for all IP and IPv6 addresses --in the 'Hosts' section
# a link to IPduh dnsbl( http://ipduh.com/ip/dnsbl )  for all IPv4 addresses --in the 'Hosts' section
#-----------------------------------------------------------------------------
# Perl Required Modules: None
# To install:
# add ipduh_intel.pm to the AWStats Plugin Directory
# add 'LoadPlugin="ipduh_intel"' to the Plugin Section in your awstats.*.conf
#-----------------------------------------------------------------------------
# $Revision: 1.0 $ - $Author: g0 - kod.ipduh.com $ - $Date: 1343857292 $

#use strict;
no strict "refs";

#-----------------------------------------------------------------------------
# ipduh_intel PLUGIN VARIABLES
#-----------------------------------------------------------------------------
my $PluginNeedAWStatsVersion="5.5";
my $PluginHooksFunctions="ShowInfoURL ShowInfoHost";
my $PluginName = "ipduh_intel";

#-----------------------------------------------------------------------------
# PLUGIN INIT FUNCTION: Init_pluginname
#-----------------------------------------------------------------------------
sub Init_ipduh_intel {
        my $InitParams=shift;
        my $checkversion=&Check_Plugin_Version($PluginNeedAWStatsVersion);

        debug(" Plugin ipduh_intel: InitParams=$InitParams",1);

        return ($checkversion?$checkversion:"$PluginHooksFunctions");
}
#-----------------------------------------------------------------------------
sub ShowInfoURL_ipduh_intel
{
my $param="$_[0]";
    if($param !~ /^\/.*/ )
    {
        print "<a target=_blank href=\"http://ipduh.com/url/bouncer/?$param\">bouncer</a> &nbsp; ";
        print "<a target=_blank href=\"http://ipduh.com/url/decode/?$param\">dec</a> &nbsp; ";
    }
return 1;
}
#------------------------------------------------------------------------------
sub ShowInfoHost_ipduh_intel
{
my $param="$_[0]";
    if($param eq '__title__' )
    {
        print "<th colspan=2><a target=_blank new href=\"http://ipduh.com\">ipduh_intel</a></th>";
    }
    elsif( $param =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ || $param =~ /^[0-9A-F]*:/i )
    {
        if( $param =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ )
        {      
           print "<td><a target=_blank new href=\"http://ipduh.com/demux/?$param\">demux</a></td>";
           print "<td><a target=_blank new href=\"http://ipduh.com/ip/dnsbl/?IPin=$param\">dnsbl</a></td>";
        }
        else
        {
           print "<td colspan=2><a target=_blank new href=\"http://ipduh.com/demux/?$param\">demux</a></td>";
        }
    }
return 1;      
}
#------------------------------------------------------------------------------
1;







ipduh_intel simple --an awstats plugin