Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
Current Path : /scripts/ |
|
Current File : //scripts/cleanmsglog |
#!/usr/local/cpanel/3rdparty/bin/perl
my @LOGDIRS = (
"/var/spool/exim",
"/var/spool/exim_incoming"
);
my $tendays = ( 60 * 60 * 24 * 10 );
my $keeptime = ( time() - $tendays );
foreach my $logdir (@LOGDIRS) {
opendir( LOGDIR, "${logdir}/msglog" );
my @MSGS = readdir(LOGDIR);
closedir(LOGDIR);
foreach my $log (@MSGS) {
if ( $log =~ /^\w+\-\w+-\w+$/
&& !-e "${logdir}/input/${log}-H" ) {
my $modtime = ( stat("${logdir}/msglog/${log}") )[9];
if ( $modtime < $keeptime ) {
print "Removing stable file ${logdir}/msglog/${log}..";
unlink("${logdir}/msglog/${log}");
print "..Done\n";
}
}
}
}
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat