From ce0e97879e4ef8774832b79dc09191f882e54014 Mon Sep 17 00:00:00 2001 From: Palma Solutions LTD Date: Sat, 9 Feb 2019 10:50:46 +0100 Subject: [PATCH] tweaks --- run.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/run.sh b/run.sh index a627918..e7b05c4 100644 --- a/run.sh +++ b/run.sh @@ -1,14 +1,14 @@ #bin/sh! # checking for unrelated -echo '[*] Checking for Unrelated Data'; >> $(whoami).txt +echo '[*] Checking for Unrelated Data'; echo >> $(whoami) -echo '[*] Directories with more than 1GB size:'; >> $(whoami).txt +echo '[*] Directories with more than 1GB size:'; du -h ./ | grep '[0-9]G\>' >> $(whoami).txt echo >> $(whoami) -echo '[*] Files with more than 10M size:'; >> $(whoami).txt +echo '[*] Files with more than 10M size:'; find ./ -size +10000k -exec du -sh {} \; >> $(whoami).txt -echo '[*]Fixing file and folder permissions:'; >> $(whoami).txt +echo '[*] Fixing file and folder permissions:'; #directories find public_html/ -perm 0000 -follow -type d -print -exec chmod 755 {} \; >> $(whoami).txt find public_html/ -perm +og+w -follow -type d -print -exec chmod 755 {} \; >> $(whoami).txt @@ -22,23 +22,23 @@ echo '[*]Fixing file and folder permissions:'; >> $(whoami).txt find public_html/ -perm +og+w -follow -type f -name "*.cgi" -print -exec chmod 755 {} \; >> $(whoami).txt find public_html/ -perm +og+w -follow -type f -name "*.pl" -print -exec chmod 755 {} \; >> $(whoami).txt echo -echo '[*] Removing data garbage like error logs:'; >> $(whoami).txt +echo '[*] Removing data garbage like error logs:'; echo >> $(whoami).txt find public_html/ -type f -name "error_log" -exec rm -rfv {} \; >> $(whoami).txt -echo '[*] Running the malware cleaner:' >> $(whoami).txt +echo '[*] Running the malware cleaner:'; perl /home/$(whoami)/public_html/LP-MSH-Scanner/malwaresh.pl $(whoami) >> $(whoami).txt echo >> $(whoami).txt -echo '[*] Running the Python scanner :' >> $(whoami).txt +echo '[*] Running the Python scanner :'; python /home/$(whoami)/public_html/LP-MSH-Scanner/scan.py --minscore=10 /home/$(whoami) | grep filename >> $(whoami).txt echo >> $(whoami).txt -echo '[*] Running the CMS Version Scanner:' >> $(whoami).txt +echo '[*] Running the CMS Version Scanner:'; php -d memory_limit=512M /home/$(whoami)/public_html/LP-MSH-Scanner/cms-vss.php $(whoami) >> $(whoami).txt echo >> $(whoami).txt -echo '[*] Running the PHP Scanner:' >> $(whoami).txt +echo '[*] Running the PHP Scanner:'; cd /home/$(whoami)/public_html/LP-MSH-Scanner && php -d memory_limit=512M scan.php >> $(whoami).txt echo >> $(whoami).txt cat $(whoami).txt | mail -s 'MSH Scan of $(whoami)' malin.cenusa@lunarpages.com -echo '[*] Job done... removing the scanner' +echo '[*] Job done... removing the scanner'; rm -rf /home/$(whoami)/public_html/LP-MSH-Scanner