How To Cleanup Hacked WordPress PHP Code Using A Perl Script

Published Date Author: , Posted March 21st, 2012 at 1:07:34am

Perl to the Rescue!

This perl script cleans just one type of infection as an example. Vary the script to search for and clean other combinations and patterns. Also, the script is deliberately written long-hand and verbose, and could be significantly more compact and efficient. It was done this way for ease of use and reading. The script actually runs faster than it looks like it should…YMMV

VERSION 1

VERSION 2

One Other Important Search – Manual Cleanup

grep -Rn --include='*.php' base64_decode * | grep gzinflate

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.