Fork me on GitHub

2010年4月26日

摘要: 我在上一篇文章中讲到了如何使用C#模拟用户登录具有验证码网站。今天我就换位思考一下,站在网站开发人员的角度讲一讲验证码的的一个安全问题:及时销毁网站中的验证码。为了方便大家理解,这里我就以一个投票的应用网站为例进行说明。投票网站首先要防止的就是用户不断点击投票按钮来重复投票;当然,避免重复投票的解决办法有很多,比如记录IP、写入Session、Cookie甚至还有要求用户输入身份证号码等。但是你记... 阅读全文
posted @ 2010-04-26 22:37 HackerVirus 阅读(526) 评论(1) 推荐(0)
摘要: 第一个方法:/* 经测试,在 14483461 条记录中查询第 100000 页,每页 10 条记录按升序和降序第一次时间均为 0.47 秒,第二次时间均为 0.43 秒,测试语法如下: exec GetRecordFromPage news,newsid,10,100000 news 为 表名, newsid 为关键字段, 使用时请先对 newsid 建立索引。*//* 函数名称: Ge... 阅读全文
posted @ 2010-04-26 22:34 HackerVirus 阅读(450) 评论(0) 推荐(0)
摘要: 首先可以传来一个strCode,这个可以用简单的脚本生成就可以了function buildImgCode() { vImgCode=Math.random().toString(10).substring(2,6); document.getElementById("imgCode").src="生成图片的页面.aspx?c="+vImgCode; }生成图片的页面:this.buildCode... 阅读全文
posted @ 2010-04-26 22:31 HackerVirus 阅读(597) 评论(0) 推荐(0)
摘要: System;using System.Collections.Generic;using System.Text;using System.Threading;using System.Drawing;using System.Drawing.Drawing2D; namespace FreeOH.Validate{ /// <summary> /// 本类用于产生随机的验证码 //... 阅读全文
posted @ 2010-04-26 22:29 HackerVirus 阅读(669) 评论(0) 推荐(0)
摘要: using System;using System.IO;using System.Web;using System.Text;using System.Drawing;using System.Drawing.Imaging;/// <summary>///Cls_PicVcode生成图片/// </summary>public class ValidateCode{ /... 阅读全文
posted @ 2010-04-26 22:27 HackerVirus 阅读(270) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;using System.IO;using System.Security.Cryptography;using System.Collections;namespace Deking{ class DesEncryption {//默认密钥向量 private stat... 阅读全文
posted @ 2010-04-26 22:06 HackerVirus 阅读(504) 评论(0) 推荐(0)
摘要: 代码 阅读全文
posted @ 2010-04-26 21:44 HackerVirus 阅读(340) 评论(0) 推荐(0)
摘要: 下面介绍常用的加密解密方法:1.加密。   Response.Redirect("DetailInfo.aspx?id=" + Convert.ToBase64String(System.Text.Encoding.Default.GetBytes("sp10006")).Replace("+","%2B"));   2.解密。   string ID = System.Text.Encoding... 阅读全文
posted @ 2010-04-26 21:23 HackerVirus 阅读(610) 评论(0) 推荐(0)
摘要: 写这心得之前先申明一下前提条件是win2003+Microsoft Visual Studio .NET 2003+Microsoft Visual Studio 2005:在一个偶然的时机,在研究代码的时候,发现机器上asp.net 1.1网站打不开啦,到IIS里去一查,原来IIS上的asp.net version 只有2.0的啦!这事怎么回事,我现在也还没查出其原因,反正没有ASP.NET 1... 阅读全文
posted @ 2010-04-26 10:27 HackerVirus 阅读(219) 评论(0) 推荐(0)

2010年4月22日

摘要: 本文搜集了大量 jQuery 表格插件,帮助 Web 设计者更好地驾御 HTML 表格,你可以对表格进行横向和竖向排序,设置固定表头,对表格进行搜索,对大表格进行分页,对表格进行滚动,拖放操作等等。这些插件很多都包含详细的教 程。jQuery 表格插件Flexigrid – Web 2.0 Javscript Grid for jQuery- 可变列宽,自动适应表头宽度,可通过 Aja... 阅读全文
posted @ 2010-04-22 10:21 HackerVirus 阅读(356) 评论(0) 推荐(1)