I’m trying to code If (the query contains any common attack terms, over 80 characters etc) { execute function }
I know preg_replace allows characters but is there a function to disallow set strings or how to build something like:
if(isset( contains['DROP, OR, 1-1, etc]) ) {
$message = $_SERVER["REMOTE_ADDR"];
$message = $_SERVER[""];
mail('admins@website.com', 'Shady Query Going on', $message);
}
I know various plugins send warnings of multiple login attempts and lockouts etc. I’m looking to do the same with SQLi attempts
UPDATE: Turns out that this is in fact a useful plugin – Better WP Security emails you when bad logins and other shady business goes on. No one answered my question either, seems like a bunch of elitist rants…
Thanks to @Rook and @Thawab tho!
I would recommend using http://phpids.org/ in your script since it can detect more attacks.