jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [trunk/] [modules/] [networks/] [platform/] [linux.pm] - Diff between revs 1 and 5

Show entire file Ignore whitespace

Rev 1 Rev 5
Line 12... Line 12...
my %args=@_; my %args=@_;
   
my $IPTABLES=$args{IPTABLES}; my $IPTABLES=$args{IPTABLES};
   
if ( (! -e "acct_int.dat") || (! -e "acct_ext.dat")) { if ( (! -e "acct_int.dat") || (! -e "acct_ext.dat")) {
system("$IPTABLES -L acct_int -xvn > acct_int.dat"); system("$IPTABLES -L acct_int_tcp -xvn > acct_int.dat");
system("$IPTABLES -L acct_ext -xvn > acct_ext.dat"); system("$IPTABLES -L acct_ext_tcp -xvn > acct_ext.dat");
  foreach $prt ("udp","icmp","all") {
  system("$IPTABLES -L acct_int_$prt -xvn >> acct_int.dat");
  system("$IPTABLES -L acct_ext_$prt -xvn >> acct_ext.dat");
  }
} }
   
my %acct_int_old=readfile("acct_int.dat",$IPTABLES); my %acct_int_old=readfile("acct_int.dat",$IPTABLES);
my %acct_ext_old=readfile("acct_ext.dat",$IPTABLES); my %acct_ext_old=readfile("acct_ext.dat",$IPTABLES);
system("$IPTABLES -L acct_int -xvn > acct_int.dat"); system("$IPTABLES -L acct_int_all -xvn > acct_int.dat");
system("$IPTABLES -L acct_ext -xvn > acct_ext.dat"); system("$IPTABLES -L acct_ext_all -xvn > acct_ext.dat");
  foreach $prt ("udp","icmp","tcp") {
  system("$IPTABLES -L acct_int_$prt -xvn | sed 's/all/$prt/g' >> acct_int.dat");
  system("$IPTABLES -L acct_ext_$prt -xvn | sed 's/all/$prt/g' >> acct_ext.dat");
  }
my %acct_int=readfile("acct_int.dat",$IPTABLES); my %acct_int=readfile("acct_int.dat",$IPTABLES);
my %acct_ext=readfile("acct_ext.dat",$IPTABLES); my %acct_ext=readfile("acct_ext.dat",$IPTABLES);
   
my $time=time; my $time=time;
   

Powered by WebSVN 2.2.1