·Àsql×¢ÈëÀà
using System;
using System.Text.RegularExpressions;
using System.Web;
namespace FSqlKeyWord
{
/**//**//**//// <summary>
/// SqlKey µÄժҪ˵Ã÷¡£
/// </summary>
public class SqlKey
{
private HttpRequest request;
//private const string StrKeyWord = @"select|insert|delete|from|count(|drop table|update|truncate|asc(|mid(|char(|xp_cmdshell|exec master|netlocalgroup administrators|:|net user|""|or|and";
//string StrKeyWord1 = @"(like|and|exec|insert|select|delete|update|chr|mid|master|or|truncate|char|declare|join)".Replace("|",")|(");
private const string StrKeyWord = @"( like | and | exec |insert|select|delete|update|chr|mid|master| or |truncate|char|declare|join|exec master|xp_cmdshell|net user|systypes|sysobjects)";
//private const string StrRegex = @"([-|;|,|/|(|)|[|]|}|{|%|@|*|!|'])";
private const string StrRegex = @"--|'|@|!";
public SqlKey(System.Web.HttpRequest _request)
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
this.request = _request;
}
public SqlKey()
{
//
// TODO: ÔÚ´Ë´¦Ìí¼Ó¹¹Ô캯ÊýÂß¼
//
//this.request = _request;
}
/**//**//**//// <summary>
/// Ö»¶ÁÊôÐÔ SQL¹Ø¼ü×Ö
/// </summary>
public static string KeyWord
{
get
{
return StrKeyWord;
}
}
/**//**//**//// <summary>
/// Ö»¶ÁÊôÐÔ¹ýÂËÌØÊâ×Ö·û
/// </summary>
public static string RegexString
{
get
{
return StrRegex;
}
}
/**//**//**//// <summary>
/// ¼ì²éURL²ÎÊýÖÐÊÇ·ñ´øÓÐSQL×¢Èë¿ÉÄܹؼü×Ö¡£
/// </summary>
/// <param na
Ïà¹ØÎĵµ£º
create trigger updatemaster //´´½¨´¥·¢Æ÷Ãû×ÖÊÇ updatemaster
on votedetails &nb ......
ÔÚÊý¾Ý¿â¿ª·¢¹ý³ÌÖУ¬µ±Äã¼ìË÷µÄÊý¾ÝÖ»ÊÇÒ»Ìõ¼Ç¼ʱ£¬ÄãËù±àдµÄÊÂÎñÓï¾ä´úÂëÍùÍùʹÓÃSELECT INSERT Óï¾ä¡£µ«ÊÇÎÒÃdz£³£»áÓöµ½ÕâÑùÇé¿ö£¬¼´´Óijһ½á¹û¼¯ÖÐÖðÒ»µØ¶ÁÈ¡Ò»Ìõ¼Ç¼¡£ÄÇôÈçºÎ½â¾öÕâÖÖÎÊÌâÄØ£¿ÓαêΪÎÒÃÇÌṩÁËÒ»ÖÖ¼«ÎªÓÅÐãµÄ½â¾ö·½°¸¡£
1.1 ÓαêºÍÓαêµÄÓŵã
ÔÚÊý¾Ý¿âÖУ¬ÓαêÊÇÒ»¸ö ......
Ò»¡¢Ñ»·
create table tb(
col1 varchar(1),
col2 varchar(2)
)
insert tb(col1,col2)values('0','0')
go 10000000
¶þ¡¢Êý¾ÝºÏ²¢
if object_id('[order]') is not null drop table [order]
go
create table [order]([orderid] int,[ordertype] varchar(1))
insert [ord ......
SQL Server 2000µÄ°²È«ÅäÖÃ
¡¡
¡¡SQL Server 2000µÄ°²È«ÅäÖÃÔÚ½øÐÐSQL Server
2000Êý¾Ý¿âµÄ°²È«ÅäÖÃ֮ǰ£¬Ê×ÏÈÄã±ØÐë¶Ô²Ù×÷ϵͳ½øÐа²È«ÅäÖ㬱£Ö¤ÄãµÄ²Ù×÷ϵͳ´¦ÓÚ°²È«×´Ì¬¡£È»ºó¶ÔÄãҪʹÓõIJÙ×÷Êý¾Ý¿âÈí¼þ£¨³ÌÐò£©½øÐбØÒªµÄ°²
È«ÉóºË£¬±ÈÈç¶ÔASP¡¢PHPµÈ½Å±¾£¬ÕâÊǺܶà»ùÓÚÊý¾Ý¿âµÄWEBÓ¦Óó£³öÏֵݲȫÒþ»¼£ ......
ÈçºÎʹÓà SSL À´È·±£Óë SQL Server 2000 °²È«Í¨ÐÅ
¸üÐÂÈÕÆÚ£º 2004Äê04ÔÂ20ÈÕ
±¾Ò³ÄÚÈÝ
Ä¿±ê
ÊÊÓ÷¶Î§
ÈçºÎʹÓñ¾ÕÂÄÚÈÝ
ÕªÒª
Äú±ØÐëÁ˽âµÄ±³¾°ÖªÊ¶
°²×°·þÎñÆ÷ÑéÖ¤Ö¤Êé
ÑéÖ¤Ö¤ÊéÊÇ·ñÒÑ°²×°
ÔÚ¿Í»§¶Ë°²×° CA °ä·¢µÄÖ¤Êé
Ç¿ÖÆËùÓпͻ§¶ËʹÓà SSL
ÔÊÐí¿Í»§¶Ë¾ö¶¨ÊÇ·ñʹÓà SSL
Ñé֤ͨÐÅÊÇ·ñÒѼÓÃÜ
ÆäËû× ......