易截截图软件、单文件、免安装、纯绿色、仅160KB

asp防SQL注入函数


'SQL防注入函数,调用方法,在需要防注入的地方替换以前的request("XXXX")为SafeRequest("XXXX")
  
'www.yongfa365.com
  
  
Function
 SafeRequest(ParaValue)   
    ParaValue = 
Trim
(
Request
(ParaValue))   
    
If
 ParaValue = 
""
 
Then
  
        SafeRequest = 
""
  
        
Exit
 
Function
  
    
End
 
If
  
    
'要过滤的字符以","隔开
  
    LockValue = 
"',Select,Update,Delete,insert,Count(,drop table,truncate,Asc(,Mid(,char(,xp_cmdshell,exec master,net localgroup administrators,And,net user,Or"
  
    LockValue = 
Split
(LockValue, 
","
)   
    
'判断是否有注入
  
    
For
 i = 0 
To
 
UBound
(LockValue)   
        
If
 
InStr
(
LCase
(ParaValue), 
LCase
(LockValue(i)))>0 
Then
  
            errmsg = 1   
            
Exit
 
For
  
        
End
 
If
  
    
Next
  
    
'注入处理
  
    
If
 errmsg = 1 
Then
  
        
Response
.
Write
 
"<script language=


相关文档:

mysql sql 百万级数据库优化方案

1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。
2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎
放弃使用索引而进行全表扫描,如:
select id from t where num is null
可以在num上设置
默认值0,确保表中num列没有null值,然后这
样查询:
sel ......

SQL*PLUS中函数

创建函数
CREATE OR REPLACE FUNCTION ntfuc(inp IN NUMBER)
RETURN NUMBER
IS
ntmp NUMBER;
BEGIN
ntmp := inp;
RETURN ntmp;
END ntfuc;
/
执行该函数时
DECLARE
rcn NUMBER;
BEGIN
rcn := ntfunc(1);
END;
/ ......

SQL Server查询优化

MS SQL Server查询优化方法
作者:xmllover 2007-11-29 
查询速度慢的原因很多,常见如下几种 
  1、没有索引或者没有用到索引(这是查询慢最常见的问题,是程序设计的缺陷) 
  2、I/O吞吐量小,形成了瓶颈效应。 
  3、没有创建计算列导致查询不优化。 
  4、内存 ......

Rebuild indexes online with SQL Server 2005

Rebuild indexes online with SQL Server 2005
http://blogs.techrepublic.com.com/datacenter/?p=249
Online index rebuild
SQL Server 2005 introduces the ability to rebuild your indexes in an
online fashion so that other processes are able to access the table
while the rebuild is occurring. Because y ......

[Sql]EXCEPT 和 INTERSECT关键字

[Sql]EXCEPT 和 INTERSECT关键字
http://www.cnblogs.com/treeyh/archive/2008/07/01/1232845.html
EXCEPT
从 EXCEPT 操作数左边的查询中返回右边的查询未返回的所有非重复值。
INTERSECT
返回 INTERSECT 操作数左右两边的两个查询均返回的所有非重复值。
A. 使用 EXCEPT
在示例中使用 TableA 和 TableB 中的数据。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号