ZKuJoe
07-05-2009, 11:25 AM
Here's the code I'm using (was working on my old server before migrating to the new one:
#!/bin/bash
FINDBIN=/usr/bin/find
EGREPBIN=/bin/egrep
BADWORDS="warez|proxy|hacks"
echo " PHP SCAN STARTED"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++"
$FINDBIN /home/public_html/ -iname \*.php -type f -exec $EGREPBIN -i -H $BADWORDS {} \;
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo " PHP SCAN ENDED"
Here is the output:
PHP SCAN STARTED
++++++++++++++++++++++++++++++++++++++++++++++++++++
: No such file or directory/find
++++++++++++++++++++++++++++++++++++++++++++++++++++
PHP SCAN ENDED
I've reinstalled findutils with no luck, I verified the location of find and it is correct.
# whereis find
find: /usr/bin/find /usr/share/man/man1p/find.1p.gz /usr/share/man/man1/find.1.gz
Any ideas why this would work on the old server and not the new one since they are pretty much identical in terms of both hardware and software?
#!/bin/bash
FINDBIN=/usr/bin/find
EGREPBIN=/bin/egrep
BADWORDS="warez|proxy|hacks"
echo " PHP SCAN STARTED"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++"
$FINDBIN /home/public_html/ -iname \*.php -type f -exec $EGREPBIN -i -H $BADWORDS {} \;
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo " PHP SCAN ENDED"
Here is the output:
PHP SCAN STARTED
++++++++++++++++++++++++++++++++++++++++++++++++++++
: No such file or directory/find
++++++++++++++++++++++++++++++++++++++++++++++++++++
PHP SCAN ENDED
I've reinstalled findutils with no luck, I verified the location of find and it is correct.
# whereis find
find: /usr/bin/find /usr/share/man/man1p/find.1p.gz /usr/share/man/man1/find.1.gz
Any ideas why this would work on the old server and not the new one since they are pretty much identical in terms of both hardware and software?
