返回列表 发新帖

求一段asp判断来路的代码

[复制链接]
头像被屏蔽
发表于 2010-8-1 10:55:31  | 显示全部楼层 | 阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
头像被屏蔽
发表于 2010-8-1 11:21:40  | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

头像被屏蔽
发表于 2010-8-1 11:25:14  | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2010-8-1 11:29:32  | 显示全部楼层
<%
dim ComeUrl,cUrl,AdminName

ComeUrl=lcase(trim(request.ServerVariables("HTTP_REFERER")))
if ComeUrl="" then
response.write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许直接输入地址访问本系统的后台管理页面。</font></p>"
response.end
else
cUrl=trim("http://" & Request.ServerVariables("SERVER_NAME"))
if mid(ComeUrl,len(cUrl)+1,1)=":" then
  cUrl=cUrl & ":" & Request.ServerVariables("SERVER_PORT")
end if
cUrl=lcase(cUrl & request.ServerVariables("SCRIPT_NAME"))
if lcase(left(ComeUrl,instrrev(ComeUrl,"/")))<>lcase(left(cUrl,instrrev(cUrl,"/"))) then
  response.write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。</font></p>"
  response.end
end if
end if
%>
---------------------------------------
Function CheckDataFrom()
  CheckDataFrom = True
  server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
  server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
  If mid(server_v1,8,len(server_v2))<>server_v2 then CheckDataFrom = False
End Function

If not CheckDataFrom() Then Response.write "禁止从站外提交数据"
-------------------------------------------------------------------------------------------
参考  
本人不懂asp    略会jsp
1

查看全部评分

回复

使用道具 举报

头像被屏蔽
发表于 2010-8-1 11:39:49  | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2010-8-1 18:44:24  | 显示全部楼层
<%
'================================================

Function CheckReference()

        Dim strReferer
        strReferer = CStr(Request.ServerVariables("HTTP_REFERER"))
        If(strReferer = "http://www.315jm.com/11.html" or strReferer = "http://315jm.com/11.html") Then
                Response.Redirect("http://315jm.com/444.html")
        Else
                Response.Write("禁止非法入侵!")
                Response.End()
        Enf if
       
End Function

Call CheckReference()
%>
3

查看全部评分

回复

使用道具 举报

头像被屏蔽
发表于 2010-8-2 07:16:24  | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

头像被屏蔽
发表于 2010-8-2 07:19:57  | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2010-8-4 18:02:02  | 显示全部楼层
来路是11.html
不过我比较奇怪,你44.html里怎么通过asp的语法获取来路呢,只能js吧。。
回复

使用道具 举报

发表于 2010-8-4 22:36:16  | 显示全部楼层
天书~
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关于我们
关于我们
友情链接
联系我们
帮助中心
网友中心
购买须知
支付方式
服务支持
资源下载
售后服务
定制流程
关注我们
官方微博
官方空间
官方微信
快速回复 返回顶部 返回列表