Created
August 20, 2015 14:20
-
-
Save felixebert/dd3011b8e702a5879507 to your computer and use it in GitHub Desktop.
delete files using find + checksum - e.g. for hacked wordpress sites
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 | |
files=$(find . -name ".htaccess") | |
for file in $files; do | |
md5=`md5sum ${file} | awk '{ print $1 }'` | |
if [ "aaecfaf864b713ea1b05151222649929" = "$md5" ]; then | |
rm -f $file | |
else | |
echo $file | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment