Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Commit

Permalink
Script
Browse files Browse the repository at this point in the history
  • Loading branch information
druidvav committed Nov 19, 2013
1 parent 6f44eef commit 4959f62
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions sbin/find-viruses.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
if [ -z $1 ]; then
echo "usage: $0 directory"
exit 1
fi

echo "Preparing filelist..."
rm /tmp/av-php.tmp
find $1 -type f -name *.php > /tmp/av-php.tmp
echo "Searching in php files [1]..."
xargs -d "\n" grep -li "eval(gzin" < /tmp/av-php.tmp
echo "Searching in php files [2]..."
xargs -d "\n" grep -li "eval(base64" < /tmp/av-php.tmp
echo "Searching in php files [3]..."
xargs -d "\n" grep -li "Vvedite hash" < /tmp/av-php.tmp
echo "Searching in php files [4]..."
xargs -d "\n" grep -li 'preg_replace("\/\.\*\/"' < /tmp/av-php.tmp
echo "Searching in php files [5]..."
xargs -d "\n" grep -l '$auth_pass' < /tmp/av-php.tmp
rm /tmp/av-php.tmp

echo "Searching in htaccess..."
find $1 -type f -name .htaccess -exec grep -li "RewriteCond %{HTTP_USER_AGENT} !" {} \;

0 comments on commit 4959f62

Please sign in to comment.