Skip to content

Instantly share code, notes, and snippets.

@shaheemirza
Forked from danreb/base64_finder.sh
Last active August 29, 2015 14:27
Show Gist options
  • Save shaheemirza/9edb89fdb610de0d442f to your computer and use it in GitHub Desktop.
Save shaheemirza/9edb89fdb610de0d442f to your computer and use it in GitHub Desktop.
Find all PHP code with base64_decode - useful to find suspected hacker files
find /home/HOMEDIR/public_html \( -name "*.php" \) -type f -print0 | xargs -0 grep --binary-files=without-match -ir "base64_decode\s*("
#To find files that are new within the last 5 days
find /home/HOMEDIR/public_html/ -type f -ctime -5
# To find .pl, .cgi and .sh files
find /home/HOMEDIR/public_html/ \( -iname "*.cgi" -o -iname "*.pl" -o -iname "*.sh" \) -exec ls -hog {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment