diff --git a/run.sh b/run.sh index 0466dee..33e27d0 100644 --- a/run.sh +++ b/run.sh @@ -6,6 +6,8 @@ echo echo '[*] Directories with more than 1GB size:'; du -h ./ | grep '[0-9]G\>' echo +echo '[*] Files with more than 10M size:'; + find ./ -size +10000k -exec du -sh {} \; echo '[*]Fixing file and folder permissions:'; #directories find public_html/ -perm 0000 -follow -type d -print -exec chmod 755 {} \; @@ -20,9 +22,9 @@ echo '[*]Fixing file and folder permissions:'; find public_html/ -perm +og+w -follow -type f -name "*.cgi" -print -exec chmod 755 {} \; find public_html/ -perm +og+w -follow -type f -name "*.pl" -print -exec chmod 755 {} \; echo -echo '[*] Files with more than 10M size:'; - find ./ -size +10000k -exec du -sh {} \; -echo +echo '[*] Removing data garbage like error logs:' + find public_html/ -type f -name "error_log" -exec rm -rfv {} \; + echo '[*] Running the malware cleaner:' perl /home/$(whoami)/public_html/LP-MSH-Scanner/malwaresh.pl $(whoami) echo @@ -34,4 +36,6 @@ echo '[*] Running the CMS Version Scanner:' echo echo '[*] Running the PHP Scanner:' cd /home/$(whoami)/public_html/LP-MSH-Scanner && php -d memory_limit=512M scan.php - +echo +echo '[*] Job done... removing the scanner' + rm -rf /home/$(whoami)/public_html/LP-MSH-Scanner