One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
vo
/
perl
/
asterix
/
View File Name :
str.pl
#!/usr/bin/perl use Time::Local; use POSIX; %month=("Jan",0,"Feb",1,"Mar",2,"Apr",3,"May",4,"Jun",5,\ "Jul",6,"Aug",7,"Sep",8,"Oct",9,"Nov",10,"Dec",11); %days=("Sun",0,"Mon",1,"Tue",2,"Wed",3,"Thu",4,"Fri",5,"Sat",6); $logfile="newnew"; open (LOG,$logfile); while(<LOG>) { if (/.*\sEEST\s.*/){ # manage dates chomp; ($day,$mon,$nday,$tim,$tz,$yr) = split(/\s/); ($hr,$min,$sec) = split(/:/,$tim); # print current stats # print " this is current stats:\n"; foreach $i (keys (%currentin)) { # print "$i in: $currentin{$i} out: $currentout{$i}\n"; $dailyin{$i}+=$currentin{$i}; $dailyout{$i}+=$currentout{$i}; $weeklyin{$i}+=$currentin{$i}; $weeklyout{$i}+=$currentout{$i}; $monthlyin{$i}+=$currentin{$i}; $monthlyout{$i}+=$currentout{$i}; $currentin{$i}=0; $currentout{$i}=0; } # print daily stats if ($hr==0 and $min<20){ # print " this is daily stats:\n"; foreach $i (keys (%dailyin)) { # print "$i in: $dailyin{$i} out: $dailyout{$i}\n"; $dailyin{$i}=0; $dailyout{$i}=0; } # print weekly stats if ($day eq "Sat"){ # print " this is weekly stats: \n"; foreach $i (keys (%dailyin)) { # print "$i in: $weeklyin{$i} out: $weeklyout{$i}\n"; $weeklyin{$i}=0; $weeklyout{$i}=0; } } #print monthly stats if ($nday==1){ # print "this is monthly stats:\n"; foreach $i (keys (%dailyin)) { # print "$i in: $monthlyin{$i} out: $monthlyout{$i}\n"; $monthlyin{$i}=0; $monthlyout{$i}=0; } } } next; } if (/.*195\.239\.64\..*/){ #determine our ip address ($ip1,$ip2,$amount) = split(/\s/); if ($ip1=~/^195\.239\.64\.\d+/){ $currentout{$ip1}+=$amount; } elsif ($ip2=~/^195\.239\.64\.\d+/){ $currentin{$ip2}+=$amount; } else{ print "!!!!!!! bad logfile!!!!!!!!\n"; } # print $a; } # foreign traffic ? else { if(/^195\.123\.41\.5.*/){ } else { # print; } } } print "\n since the beginning of this month:\n"; foreach $i (keys (%monthlyin)) { print " $i in: $monthlyin{$i} out: $monthlyout{$i}\n"; } print "\n since the beginning of this week:\n"; foreach $i (keys (%monthlyin)) { print " $i in: $weeklyin{$i} out: $weeklyout{$i}\n"; } print "\n since the beginning of this day:\n"; foreach $i (keys (%monthlyin)) { print " $i in: $dailyin{$i} out: $dailyout{$i}\n"; } print "\n since the last twenty minutes:\n"; foreach $i (keys (%monthlyin)) { print " $i in: $currentin{$i} out: $currentout{$i}\n"; } close LOG;