0

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?

Adamz
  • 21

1 Answers1

1

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' '{}' \;
Cyrus
  • 931