| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 808 人关注过本帖
标题:[求助]头大了,说是没有对象。请各位帮忙看看
取消只看楼主 加入收藏
云南视窗
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2005-11-26
收藏
 问题点数:0 回复次数:3 
[求助]头大了,说是没有对象。请各位帮忙看看
错误是这样的,我运行一个按钮叫《确定修改》
结果就出现下边的错误

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: 'killsqlconn'

/dg/admin/conn.asp,行26


这相关的源代码是,第26行指的是红色那段,请朋友帮忙看看,我太菜了,刚开始学习,呵呵,谢谢啊 。如果可以请帮我修改一下,谢谢啦,
Dim Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh,Fy_db,Fy_dbstr,Kill_IP,WriteSql
'说明--定义
Fy_In = "'|;|and|(|)|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
Kill_IP=True
WriteSql=True
'----------------------------------


Fy_Inf = split(Fy_In,"|")
'说明-POST
If Request.Form<>"" Then
For Each Fy_Post In Request.Form
For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.Form(Fy_Post)),Fy_Inf(Fy_Xh))<>0 Then
If WriteSql=True Then
killsqlconn.Execute("insert into SqlIn(Sqlin_IP,SqlIn_Web,SqlIn_FS,SqlIn_CS,SqlIn_SJ) values('"&Request.ServerVariables("REMOTE_ADDR")&"','"&Request.ServerVariables("URL")&"','POST','"&Fy_Post&"','"&replace(Request.Form(Fy_Post),"'","''")&"')")
killsqlconn.close
Set killSqlconn = Nothing
End If

[此贴子已经被作者于2005-12-7 17:12:34编辑过]

搜索更多相关主题的帖子: face 宋体 Microsoft size 
2005-12-07 17:11
云南视窗
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2005-11-26
收藏
得分:0 
以下是引用dreame在2005-12-7 18:15:00的发言:

1.检查你的if ,end if是否都是成对的,应该是少了end if
2.你的conn.asp中killsqlconn对象没有设置好

应该就是conn中的killsqlconn对象没有设置吧 ,谢谢。
也谢谢楼上的。
2005-12-07 18:17
云南视窗
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2005-11-26
收藏
得分:0 

我还是没有搞清楚,我把整个代码发来,请帮我看看。谢谢。请帮我修改修改谢谢。

<%
'option explicit
dim conn,connstr,db,rs,rs_s,rs_s1
db="../dasa/dasa.asa"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
conn.Open connstr


'--------定义部份------------------
Dim Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh,Fy_db,Fy_dbstr,Kill_IP,WriteSql
'自定义需要过滤的字串,用 "|" 分隔
Fy_In = "'|;|and|(|)|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
Kill_IP=True
WriteSql=True
'----------------------------------


Fy_Inf = split(Fy_In,"|")
'--------POST部份------------------
If Request.Form<>"" Then
For Each Fy_Post In Request.Form
For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.Form(Fy_Post)),Fy_Inf(Fy_Xh))<>0 Then
If WriteSql=True Then
killsqlconn.Execute("insert into SqlIn(Sqlin_IP,SqlIn_Web,SqlIn_FS,SqlIn_CS,SqlIn_SJ) values('"&Request.ServerVariables("REMOTE_ADDR")&"','"&Request.ServerVariables("URL")&"','POST','"&Fy_Post&"','"&replace(Request.Form(Fy_Post),"'","''")&"')")
killsqlconn.close
Set killSqlconn = Nothing
End If
Response.Write "<Script Language=JavaScript>alert('SQL通用防注入系统提示你↓\n\n请不要在参数中包含非法字符尝试注入!\n\nHttp://www.kunyyy.Com 系统版本:ASP版\n\nBy:kunyyy');</Script>"
Response.Write "非法操作!系统做了如下记录↓<br>"
Response.Write "操作IP:"&Request.ServerVariables("REMOTE_ADDR")&"<br>"
Response.Write "操作时间:"&Now&"<br>"
Response.Write "操作页面:"&Request.ServerVariables("URL")&"<br>"
Response.Write "提交方式:POST<br>"
Response.Write "提交参数:"&Fy_Post&"<br>"
Response.Write "提交数据:"&Request.Form(Fy_Post)
Response.End
End If
Next
Next
End If
'----------------------------------

'--------GET部份-------------------
If Request.QueryString<>"" Then
For Each Fy_Get In Request.QueryString
For Fy_Xh=0 To Ubound(Fy_Inf)
If Instr(LCase(Request.QueryString(Fy_Get)),Fy_Inf(Fy_Xh))<>0 Then
If WriteSql=True Then
killSqlconn.Execute("insert into SqlIn(Sqlin_IP,SqlIn_Web,SqlIn_FS,SqlIn_CS,SqlIn_SJ) values('"&Request.ServerVariables("REMOTE_ADDR")&"','"&Request.ServerVariables("URL")&"','GET','"&Fy_Get&"','"&replace(Request.QueryString(Fy_Get),"'","''")&"')")
killSqlconn.close
Set killSqlconn = Nothing
End If
Response.Write "<Script Language=JavaScript>alert('SQL通用防注入系统提示你↓\n\n请不要在参数中包含非法字符尝试注入!\n\nHttp://www.kunyyy.Com 系统版本:ASP版\n\nBy:kunyyy');</Script>"
Response.Write "非法操作!系统做了如下记录↓<br>"
Response.Write "操作IP:"&Request.ServerVariables("REMOTE_ADDR")&"<br>"
Response.Write "操作时间:"&Now&"<br>"
Response.Write "操作页面:"&Request.ServerVariables("URL")&"<br>"
Response.Write "提交方式:GET<br>"
Response.Write "提交参数:"&Fy_Get&"<br>"
Response.Write "提交数据:"&Request.QueryString(Fy_Get)
Response.End
End If
Next
Next
End If
function nosql(str)
if isnull(str) then
str = ""
exit function
end if
str=trim(str)
str=replace(str,"&","&amp;") '&
str=replace(str,";","&#59;") '分号
str=replace(str,"'","&#39;") '单引号
str=replace(str,"""","&quot;") '双引号
str=replace(str,"chr(9)","&nbsp;") '空格
str=replace(str,"chr(10)","<br>") '回车
str=replace(str,"chr(13)","<br>") '回车
str=replace(str,"chr(32)","&nbsp;") '空格
str=replace(str,"chr(34)","&quot;") '双引号
str=replace(str,"chr(39)","&#39;") '单引号
str=Replace(str, "script", "&#115cript")'script
str=replace(str,"<","&lt;") '左<
str=replace(str,">","&gt;") '右>
str=replace(str,"(","&#40;") '左(
str=replace(str,")","&#41;") '右)
str=replace(str,"*","&#42;") '*
str=replace(str,"--","&#45;&#45;") 'SQL注释符
nosql=str
end function%>

[此贴子已经被作者于2005-12-16 3:36:08编辑过]

2005-12-07 18:23
云南视窗
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2005-11-26
收藏
得分:0 
谢谢各位了,好像好几个地方都会 。我试看
2005-12-10 11:19
快速回复:[求助]头大了,说是没有对象。请各位帮忙看看
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.036095 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved