|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /usr/local/bandmin/ |
Upload File : |
#!/usr/bin/perl -I/usr/local/bandmin
#
#****************************************
#Bandmin (c)1998-1999 J. Nick Koston (BlueDraco) bdraco{at}darkorb[dot]net
# - A simple Bandwidth Monitor
#****************************************
#
#To use this package you must have a OS that has either ipfwadm,ipchains,
#or ipfw
#
use IP::Acct;
require 'services.conf';
#print "Turning on Ip Accouting....";
$ips = `/sbin/ifconfig -a`;
$ipadmin = IP::Acct->new;
$ipadmin->flush();
@IPS = split(/\n/, $ips);
foreach $ip (@IPS) {
if ($ip =~ /(\d*)\.(\d*)\.(\d*)\.(\d*)/) {
$thisip = "$1.$2.$3.$4";
if ($thisip ne "127.0.0.1" && $thisip ne "0.0.0.0") {
$ipadmin->initip("$thisip",@SERVICES);
}
}
}
$ipadmin->initall;
#print "Done\n";