本帖最后由 zaomeng 于 2017-10-7 15:31 编辑
打开asp调试时访问网页显示的错误代码:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Microsoft Access 驱动程序] Could not find file '(未知的)'.
/inc/conn.asp,行 33
conn.asp文件部分代码:
<%
yz = ""
If Trim(Request.QueryString) <> "" Then
strTemp = strTemp & "?" & Trim(Request.QueryString)
If Instr(strTemp,"select%20") or Instr(strTemp,"insert%20") or Instr(strTemp,"delete%20") or Instr(strTemp,"count(") or Instr(strTemp,"drop%20table") or Instr(strTemp,"update%20") or Instr(strTemp,"truncate%20") or Instr(strTemp,"asc(") or Instr(strTemp,"mid(") or Instr(strTemp,"char(") or Instr(strTemp,"xp_cmdshell") or Instr(strTemp,"exec%20master") or Instr(strTemp,"net%20localgroup%20administrators") or Instr(strTemp,":") or Instr(strTemp,"net%20user") or Instr(strTemp,"'") or Instr(strTemp,"%20or%20") then
yz = "no"
End If
end if
if yanzheng = "不需要验证131" then
If Trim(Request.form) <> "" Then
strTemp = strTemp & "?" & Trim(Request.form)
If Instr(strTemp,"select+") or Instr(strTemp,"insert+") or Instr(strTemp,"delete+") or Instr(strTemp,"count(") or Instr(strTemp,"drop+table") or Instr(strTemp,"update+") or Instr(strTemp,"truncate+") or Instr(strTemp,"asc(") or Instr(strTemp,"mid(") or Instr(strTemp,"char(") or Instr(strTemp,"xp_cmdshell") or Instr(strTemp,"exec+master") or Instr(strTemp,"net+localgroup+administrators") or Instr(strTemp,"net+user") or Instr(strTemp,"%25") or Instr(strTemp,"%27") or Instr(strTemp,"+or+") then
yz = "no"
End If
end if
end if
if yz = "no" then
response.write "<br><br>请不要试图攻击本网站!本网站的运营受法律保护!<br><br>"
response.write "如果这不是攻击行为,请检查你的提交内容,里面可能有危险的字符串!"
response.End()
end if
%><%
dim conn
dim connstr
db="Database/DataShop.asp" '数据库文件位置
connstr="DBQ="+server.mappath(""&db&"")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
if err then
err.clear
else
conn.open connstr #################第三十三行
end if
|