Forum Moderators: phranque
But I wonder if it will stop or is it there any other option.
I saw logs and has different ips and countries :(
Any ideas?
silverbytes if you're using PHP, this page will tell you what you know:
[securephp.damonkohler.com...]
There are some comments that the fixes mentioned there are still vulnerable but it will slow them down, a LOT. I know you say you're not a programmer but to fix this you have to (somewhat) understand how they are doing it and then get in and get your hands dirty. :-) That article will tell you what you need to know.
Again my PHP kungfu really is not very strong and we seem to be going round in circles here. This is what I have at the moment:
<?
// heres the script for the form
clean_variables($_POST);
function clean_variables( &$value )
{
if(is_array($value)){
array_walk(&$value,'clean_variables');
return;
} else {
$value = str_replace(array("\r","\n","Content-Type:"),"",$value);
}
}
if (eregi("mydomain.com",$email)){die("Die spammer!");}
$name=$_POST['realname'];
$email=$_POST['email'];
$comments=$_POST['comments'];
$to="info@mydomain.com";
$message="$name just filled in your inquiry form. They said:\n$comments\n\nTheir e-mail address was: $email";
if(mail($to,"Inquiry from My Website",$message,"From: $email\n")) {
echo "<font face=\"Veranda\">Thanks for your inquiry. Click back to return to My Website.</font>";
} else {
echo "<font face=\"Veranda\">There was a problem sending the mail. Please check that you filled in the form correctly.</font>";
}
?>
What do I need to add/remove from that to stop these bastards? Sorry if this is painfully obvious and simple to some people but I'm no programmer.
Anybody actually has a php form code that be strong enough we can test in our websites to see if still spammed?
In one site, I have a simple php contact form from "thesitewizard" which got the spam. But in two other sites I use the Level 10 php form [leveltendesign.com...] and neither of those received any spam. So I guess that it is pretty strong.
However, the spam flood abruptly stopped around the end of September so there probably isn't much chance of testing it in your site now. Unless, heaven forbid, the assault starts again.
I don't know if anyone else received the same spam through an onsite php Search script - but I did. Fortunately the script author was on to it pretty quickly and released an update that prevents it.