Last active
April 30, 2018 11:47
-
-
Save andriyun/933e2b0f85d2eb1c2a0882254ff1a71c to your computer and use it in GitHub Desktop.
This script can be heplfull if your drupal 7 site have been hacked with "eval(String.fromCharCode" javascript code.
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/sh | |
# Run the script and put path as first parameter. | |
grep -rl 'eval(String.fromCharCode(' $1 | while read -r line ; do | |
if [ -f "$line" ] | |
then | |
echo "Fixing file $line \n" | |
sed -i 's/<script language=javascript>\([a-zA-Z0-9();.,\ ]*\)<\/script>//g' $line | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment