Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
systems:linux_maintenance_scripts [2018/05/01 15:03]
smayr [RSync]
systems:linux_maintenance_scripts [2018/05/01 15:07] (current)
smayr [RSync]
Line 63: Line 63:
 </code> </code>
  
 +== Anti-spam / Anti-crack ==
 +Run this script to scan the website and see signs of spamming or cracking: ''scan-website.sh'':
 +<code bash>
 +#!/bin/bash
 +## script: scan-website.sh
 +##
 +
 +echo "Scan Website for vulnerabilities" > /tmp/scan.txt
 +
 +cd /var/www
 +find . -name "*.php.suspected" >> /tmp/scan.txt
 +find . -name "*.php" -exec grep -H "eval(" "{}" \; >> /tmp/scan.txt
 +find . -name "*.php" -exec grep -H "\$GLOBALS.*\\x" "{}" \; >> /tmp/scan.txt
 +find . -name "*.php" -exec grep -H "function.*for.*strlen.*isset" "{}" \; >> /tmp/scan.txt
 +find . -name "*.php" -exec grep -H '<iframe' "{}" \; >> /tmp/scan.txt
 +find . -name "*.php" -exec grep -H 'header(*Location:' "{}" \; >> /tmp/scan.txt
 +less /tmp/scan.txt
 +</code>
 == Mail Spool Maintenance == == Mail Spool Maintenance ==