#! /bin/bash
based=/data/wwwroot
for f in `cat $1`; do
if [ -f $based/$f ]; then
if grep -q -i 'base64' $based/$f ; then
ls -l $based/$f
echo "base64"
grep -i 'base64' $based/$f
fi
if grep -q -i system\s*\( $based/$f ; then
ls -l $based/$f
echo "system\s*\("
grep -i system\s*\( $based/$f
fi
if egrep -i -q "select\s*|insert\s*|update\s*|grant\s*|create\s*" $based/$f; then
ls -l $based/$f
echo 'select\s*|insert\s*|update\s*|grant\s*|create\s*'
egrep -i "select\s*|insert\s*|update\s*|grant\s*|create\s*" $based/$f
fi
if egrep -i -q '\$_POST|\$_REQUEST|\$_GET|\$_SESSION' $based/$f; then
ls -l $based/$f
echo ''\$_POST|\$_REQUEST|\$_GET|\$_SESSION''
egrep -i '\$_POST|\$_REQUEST|\$_GET|\$_SESSION' $based/$f
fi
fi
done