大家好,这个http://www.sdzbw.com是我的网站,经常被注册机注入大量的垃圾信息
注册代码如下:
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
if (GetResult() == true)
{
try
{
SearchUser();
if (nuser == "0")
{
liu.Model.HN_Users mob = new liu.Model.HN_Users();
liu.BLL.HN_Users bll = new liu.BLL.HN_Users();
mob.username = TextBox1.Value.Trim();
mob.userpwd = pwds.Value.Trim();
mob.userrole = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20";
mob.votecount = 0;
mob.ndate = DateTime.Now;
mob.role = 0;
mob.show = 0;
mob.userclass = RadioButtonList1.SelectedValue.Trim();
mob.ydate = DateTime.Now;
mob.problem = "";
mob.answer = "";
mob.chengxin = 0;
mob.company = company.Value.Trim();
mob.companyclass = "";
mob.hangye = "";
mob.realname = name.Value.Trim();
mob.phones = phone.Value.Trim();
mob.mobphone = mobphone.Value.Trim();
mob.chuanzhen = "";
mob.email = email.Value.Trim();
mob.companyadr = address.Value.Trim();
mob.userdate = 1;
if (Session["Code"] != null || Session["Code"].ToString() != "")
{
if (Session["Code"].ToString().ToLower() != this.answerText.Value.ToLower())
{
this.lblAnser.Text = "问题回答错误";
this.answerText.Value = "";
Session["Code"] = null;
return;
}
else
{
this.lblAnser.Text = "";
Session["Code"] = null;
}
}
else
{
return;
}
if (Session["vvcc"] != null || Session["vvcc"].ToString() != "")
{
if (Session["vvcc"].ToString().ToLower() == this.valideText.Value.ToLower().Trim())
{
this.Label1.Text = "";
Session["vvcc"] = null;
this.valideText.Value = "";
}
else
{
this.Label1.Text = "验证码输入错误";
Session["vvcc"] = null;
this.valideText.Value = "";
return;
}
}
else
{
this.Label1.Text = "验证码过期,请重新输入";
return;
}
int s = bll.Add(mob);
}
加强验证码难度