Created
April 2, 2012 17:29
-
-
Save ahawthorne/2285454 to your computer and use it in GitHub Desktop.
wordpress hacked. arg.
This file contains hidden or 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/bash | |
# MAKE A BACKUP OF THE SITE! | |
# change directory to webroot | |
cd /var/www/hackedwordpresssite.com/html | |
# Get a list of files that contain the string "god_mode_off" and save it to a file | |
# command switches may differ depending on linux release | |
find . -type f -iname "*.php" | xargs -I{} grep -il god_mode_off {} > bad.list | |
# loop through the files in bad.list and perform inline string replacement | |
for i in `cat bad.list`; do sed -i 's/^.*god_mode_off[^>]*>//g' $i; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment