updated run.sh
This commit is contained in:
12
run.sh
12
run.sh
@@ -6,6 +6,8 @@ echo
|
|||||||
echo '[*] Directories with more than 1GB size:';
|
echo '[*] Directories with more than 1GB size:';
|
||||||
du -h ./ | grep '[0-9]G\>'
|
du -h ./ | grep '[0-9]G\>'
|
||||||
echo
|
echo
|
||||||
|
echo '[*] Files with more than 10M size:';
|
||||||
|
find ./ -size +10000k -exec du -sh {} \;
|
||||||
echo '[*]Fixing file and folder permissions:';
|
echo '[*]Fixing file and folder permissions:';
|
||||||
#directories
|
#directories
|
||||||
find public_html/ -perm 0000 -follow -type d -print -exec chmod 755 {} \;
|
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 "*.cgi" -print -exec chmod 755 {} \;
|
||||||
find public_html/ -perm +og+w -follow -type f -name "*.pl" -print -exec chmod 755 {} \;
|
find public_html/ -perm +og+w -follow -type f -name "*.pl" -print -exec chmod 755 {} \;
|
||||||
echo
|
echo
|
||||||
echo '[*] Files with more than 10M size:';
|
echo '[*] Removing data garbage like error logs:'
|
||||||
find ./ -size +10000k -exec du -sh {} \;
|
find public_html/ -type f -name "error_log" -exec rm -rfv {} \;
|
||||||
echo
|
|
||||||
echo '[*] Running the malware cleaner:'
|
echo '[*] Running the malware cleaner:'
|
||||||
perl /home/$(whoami)/public_html/LP-MSH-Scanner/malwaresh.pl $(whoami)
|
perl /home/$(whoami)/public_html/LP-MSH-Scanner/malwaresh.pl $(whoami)
|
||||||
echo
|
echo
|
||||||
@@ -34,4 +36,6 @@ echo '[*] Running the CMS Version Scanner:'
|
|||||||
echo
|
echo
|
||||||
echo '[*] Running the PHP Scanner:'
|
echo '[*] Running the PHP Scanner:'
|
||||||
cd /home/$(whoami)/public_html/LP-MSH-Scanner && php -d memory_limit=512M scan.php
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user