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

hzhost防asp攻击函数

 



hzhost防asp攻击函数
Function SafeRequest(ParaName)
Dim ParaValue
ParaValue=Request(ParaName)
if IsNumeric(ParaValue)  then
SafeRequest=ParaValue
exit Function
else
ParaValuetemp=lcase(ParaValue)
tempvalue="select
|insert |delete from|'|count(|drop table|update |truncate 
|asc(|mid(|char(|xp_cmdshell|exec master|net localgroup
administrators|net user| or | and |%20from"
temps=split(tempvalue,"|")
for mycount=0 to ubound(temps)
if  Instr(ParaValuetemp,temps(mycount)) > 0 then
        call errorpage(-2,"非法请求!!!")
        response.end
end if
next
SafeRequest=ParaValue
end if
End function
'=================


相关文档:

asp中从数据库导出EXCEL时,EXCEL宏应用的边框设置

Set xlApp = CreateObject("Excel.Application")
xlApp.DisplayAlerts = false               '不显示警告
   'xlApp.Application   = false             ......

asp中form表单的图片按钮

1、<script>按钮: 
<input type="button" name="btnRead" onClick="readCard()" style="background:url(images/qux1.gif); border:none; width:145px; height:30px;"  />&nbsp;
2、提交按钮:
<input type="submit" name="button" id="button" style="background:url(images/tj.gif); bor ......

asp操作数据库代码

 set conn=server.createobject("adodb.connection")
 conn.open "driver={microsoft access driver (*.mdb)};dbq=F:\\ajaxpro\\App_Data\\server.mdb"
 
 Dim StrSQL,RS
 StrSQL="SELECT*from Manager WHERE ID='"&username&"'"
 StrSQL=StrSQL&"AND Pin='"&passwor ......

ASP获取和还原复选框的值(0~99多项选择)

    在多项选择的一些应用中,可以用二进制1代表选中,0代表不选。例如给某用户角色分配权限abcdefg,选中情况是1001101,那么此角色包含四项权限,用一个变量表示,相应的十进制数是77。
    但是,在ASP中的多项选择,就不适合这种以数值的形式记录选中情况。因为,当项目数很多时(例如6 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号