请问这段代码是什么呢??

qq876529930 2009-11-14 03:53:48
是asp代码来的!
大家帮我分析下,这段代码是什么啊??
我觉得应该是分析后台管理员的,是嘛?
这段代码是后台的!
而这个【["&lx_sql&"_admin】其实 是数据库里的“btx_wap_98cn_0309_admin” 表!
而这个表是 存放后台管理员的信息!


<%
http_ary=split(Request.ServerVariables("SCRIPT_NAME"),"/")
http_url=http_ary(ubound(http_ary))
http_memu=Replace(Request.ServerVariables("PATH_INFO"),http_url,"")
function uan(str)
str=trim(str)
if IsNull(str) then exit function
str=replace(str,"%20","")
str=replace(str," ","")
str=replace(str,"?","")
str=replace(str," ","")
str=replace(str,"execute","")
str=replace(str,"and","")
str=replace(str,"=","")
str=replace(str,"select","")
str=replace(str,"where","")
str=replace(str,"union","")
str=replace(str,"from","")
str=replace(str,"*","")
str=replace(str,",","")
str=replace(str,"'","")
str=replace(str,"[","")
str=replace(str,"(","")
str=replace(str,")","")
str=replace(str,"^","")
str=replace(str,"]","")
str=replace(str,chr(255),"")
str=replace(str,Chr(13),"")
uan=str
end function

dim sb
sid=uan(request("sid"))
if sid="" then response.Redirect"ebotx_login.asp"
if sid<>"" then
set rs06=Server.CreateObject("ADODB.Recordset")
sql06="select mysb,fyid,id,gljb,fyname from ["&lx_sql&"_admin] where [mysb]='"&sid&"'"
rs06.open sql06,conn,1,2
if rs06.eof then
response.Redirect lx_admin&"ebotx_login.asp"
else
myid=rs06("fyid")
admin_id=rs06("id")
admin_jb=rs06("gljb")
fyname=rs06("fyname")
if admin_jb="0" then jbtxt="超级管理员"
if admin_jb="1" then jbtxt="网站管理员"
if admin_jb="2" then jbtxt="资源更新员"

end if
rs06.close
set rs06=nothing
end if
%>

...全文
67 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ayouori 2009-11-14
  • 打赏
  • 举报
回复
这个页面应该是用户验证文件,函数uan是用来过滤参数中的敏感字符,防止注入或绕过验证.
lzp4881 2009-11-14
  • 打赏
  • 举报
回复
过滤字符串,防注入用的
dean8828 2009-11-14
  • 打赏
  • 举报
回复
看不出,楼下的看的出不
Dogfish 2009-11-14
  • 打赏
  • 举报
回复
好像是拿来防止sql注入的。

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧