Last active
December 17, 2015 08:28
-
-
Save samba/5579885 to your computer and use it in GitHub Desktop.
Search for PHP files that call "eval" (that's bad).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BASEDIR="${1:-./}" | |
listfiles () { | |
find ${BASEDIR} -type f -print0 | xargs -0 file -i -0 | grep -a "x-php" | cut -d '' -f 1 | |
} | |
listfiles | xargs grep -l "eval(" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment