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
/
Edit File:
biller
#!/usr/bin/perl use Time::Local; use POSIX; use integer; $filename=$ARGV[0]; $filename="dialup-usage"; $billmonth="Jun"; $billyear=1999; $billmonth=$ARGV[0]; $billyear=$ARGV[1]; format STDOUT= @<<<<<<<<<<<<< @>>>>> calls @>>>>>> sec. = @>>>h @>m @>s $login, $call, $usage, $h, $m, $s . %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); $dbillmonth=$month{$billmonth}; $checkfrom=timelocal(0,0,0,1,$dbillmonth,$billyear); $dbillmonth+=1; if ($dbillmonth == 12) { $dbillmonth=0; $billyear+=1; } $checkto=timelocal(0,0,0,1,$dbillmonth,$billyear)-1; open (LOGFILE,$filename); while (<LOGFILE>){ chomp; ($nday,$nmon,$day,$rtime,$ryear,$host,$login,$term,$source,$action,$taskid,$service,$message) = split(/\s+/); # skip logins if (!/.+async.*/){ next; } # manage the date ($hours,$min,$sec) = split(/:/,$rtime); $year=$ryear-1900; $mon=$month{$nmon}; $mday=$day; $time=timelocal($sec,$min,$hours,$mday,$mon,$year); # for the period if ($time <$checkfrom or $time >$checkto){ next; } # $a=localtime($time); # print "$a\n"; $login=lc($login); if ($action eq "start"){ if ($status{term}){ print "\n connection not closed! \n"; } $status{$term}=1; } elsif($action eq "stop"){ $status{$term} =0; $message=~s/.*=(.*)/$1/; $totals{$login}+=$message; $calls{$login}+=1; } else{ die "error in logfile!"; } } $date1 = localtime($checkfrom); $date2 = localtime($checkto); print "Dialup usage statistics.\nStart date: $date1\nEnd date: $date2\n\n"; foreach $key (sort (keys %totals)){ $usage=$totals{$key}; $s=$usage%60; $m=($usage/60)%60; $h=$usage/3600; $login=$key; $call=$calls{$key}; write; # print "$key\t $calls{$key} calls \t$usage sec.= $hours H $min M $sec S\n"; } close (LOGFILE);
Simpan