English 中文(简体)
斯帕姆通过简单的垃圾邮件过滤器,但我不知道如何使用垃圾邮件。
原标题:Spam getting through simple spam filter, but I don t know how

我有一个简单的垃圾邮件过滤器(防止垃圾邮件提交),通过生成随机号码和用户进入网站。 由于某种原因,垃圾邮件仍然能够进入,甚至连随机进入。 是否有人想如何做到这一点?

该法典:

var randomnumber=Math.floor(Math.random()*1001);
var isNumberEnteredCorrect = false;
var whatevertheyentered;


function checkUserInput(whatevertheyentered){

if(whatevertheyentered == randomnumber){
    return true;
}
else {
    return false;
}
}

function validateForm()
{
var x = document.forms["myForm"]["random_number"].value;

  if(x == randomnumber){
    return true;
  }

  else{
    alert("The number you ve entered is incorrect.");
    return false;
  }


}

用户提出表格,要求这一纽扣:

 <input name="Submit" type="submit" class="button" value="Send Message" />
最佳回答

关于这些选择,为什么 sp子的机器人正在getting笑,就是他们不使用 Java本,而是直接提交表格。

其中一个选择是,与阿富汗复兴共和与民主军一样,采取仓促行动。 这或许会拯救你们,使其免遭一些机器人(和那些 Java已残疾的使用者)。

I don t know how spam bots internal logic, but I assume that that the bot searches for "form" tag and tries to post form contents to the form s action parameter. It this case "split-string encoding" of action form parameter and AJAX form submission might help.

然而,铭记这一陷阱只有在贵方的所在地并非主人的主要目标的情况下才会奏效。

问题回答

然而,我看不出与你javascript的任何直接错误,但任何用户都可以在其浏览器上打碎script,以便这些功能不会执行。 由于这一原因,你不应仅仅依靠 j印作为鉴定。 依靠服务器辅助语言,如PHP,则更加安全。

与PHP/ASP进行服务器边验证。 NET/ColdFusion或您重新使用的任何东西。 NEVER完全依靠客户的验证,最容易发生 ha弄和虐待。

一旦填写表格,就应当对数值进行审查。 网址上,你检查了贵方所期望的价值。 如果正确,通常进行处理,则终止执行表格/提交书,并将用户转向错误的一类页。

如果机器人残疾,无法提交表格,你可以使用Javascript提交。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签