I have a large number of sites with the same bit of php inserted in all files that contain footer in their filenames.
//###==###
malicious code
//###==###
How to use SED or another command to remove all these in all files?
I have a large number of sites with the same bit of php inserted in all files that contain footer in their filenames.
//###==###
malicious code
//###==###
How to use SED or another command to remove all these in all files?
Try this with GNU find and sed to remove those lines in php files:
find /path/to/dir -iname "*.php" -exec sed -i -e '/^\/\/###==###/,/^\/\/###==###/d' '{}' \;