Wordpress Trojan issue
Use http://sitecheck.sucuri.net/scanner/
And tp repair, see FAQ: My site was hacked « WordPress Codex and How to completely clean your hacked wordpress installation and How to find a backdoor in a hacked WordPress and Hardening WordPress « WordPress Codex and tell your host. Change all passswords. Scan your own PC.
PHP regex to fix hacked Wordpress site
Apart from the comments advising a reinstall, the regex question at hand might be greediness. The .*?
placeholder ought to match the shortest amount of characters, but sed
might have some limitations regarding line length etc. (Not sure.)
But for constraining it further you could use [^>]*
in its place:
's#<?php /\*\*/ eval(base64_decode("aWY[^>]*?>##g'
This will ensure it can't run over a closing ?>
. The base64
couldn't possibly contain this anyway.
Related Topics
Strange Behaviour with Numbers That Have a Leading Zero
Programmatically Access Currency Exchange Rates
How to Integrate Wordpress Template with Codeigniter
How to Identify Server Ip Address in PHP
Call to Undefined Function Apache_Request_Headers()
PHP Warning Permission Denied (13) on Session_Start()
How to Check If an Uploaded File Is an Image Without Mime Type
What Is the Max Key Size for an Array in PHP
PHP Check Value Against Multiple Values with Or-Operator
What Are the Differences Between Psr-0 and Psr-4
Differencebetween Sessions and Cookies in PHP
Verify Imagemagick Installation
Checking If Your Code Is Running on 64-Bit PHP
Pdostatement (Mysql): Inserting Value 0 into a Bit(1) Field Results in 1 Written in Table