#region 过滤
/// <summary>
/// 防sql注入
/// </summary>
public void Fzzr()
{
string Fy_In = "create|exec|insert|select|delete|syscolumns|count(|where|master.|truncate|char(|declare|drop|substring|dirtree|directory|unicode|sysdatabases|sysobjects|%20from| from|%20and|cmdshell|[master";
string str = System.Web.HttpContext.Current.Request.QueryString.ToString().ToLower();
string[] words = Fy_In.Split('|');
foreach (string i in words)
{
if (str.IndexOf(i) >= 0)
{
System.Web.HttpContext.Current.Response.Redirect("Url");
}
}
Fy_In = "syscolumns|count(|master.|truncate|char(|declare|substring|dirtree|unicode|sysdatabases|sysobjects|cmdshell|[master";
str = System.Web.HttpContext.Current.Request.Form.ToString().ToLower();
words = Fy_In.Split('|');
foreach (string i in words)
{
if (str.IndexOf(i) >= 0)
{
System.Web.HttpContext.Current.Response.Redirect("Url");
}
}
}
#endregion