站长资源网络编程 ADSI+ASP添加IP到IIS禁止访问列表中 整理:jimmy2024/10/28浏览2次 站长资源 网络编程 网盘链接 云盘下载 简介复制代码 代码如下:<%@ Language=VBScript %> <% Dim strIP strIP = request("IP") %> 输入IP:复制代码 代码如下:<%@ Language=VBScript %> <% Dim strIP strIP = request("IP") %> <FORM action=? method=post> 输入IP:<input type=text value="<%=strIP%>" style="BORDER: #AAAAAA 1px solid;" name="IP"> <input type="submit" value="确定发送"> </FORM> <% if strIP="list" then Call ListDenyIP("2443") response.end end if if strIP="query" then Call CheckWebSiteSetup response.end end if # if strIP<>"" then Call AddDenyIP("2443",strIP) end if Sub CheckWebSiteSetup() Set IISOBJ=GetObject("IIS://LocalHost/W3SVC") for each website in IISOBJ if website.Class="IIsWebServer" then for each b in website.ServerBindings response.write ("Server "&Website.AdsPath" has binding"&b) response.write ("<br>") next end if next end sub # Sub ListDenyIP(strWebNo) set SecObj = GETObject("IIS://LocalHost/W3SVC/"+strWebNo+"/Root") set MyIPSec = SecObj.IPSecurity IPList=MyIPSec.IPDeny if ubound(IPList)<0 then response.write "<BR>无数据,请先随便加一条<BR>" exit sub end if # intIPListCount=ubound(IPList)+1 # for i=0 to ubound(IPList) response.write i+1 response.write ":" response.write IPList(i) response.write "<br>" next end sub Sub AddDenyIP(strWebNo,strDenyIp) set SecObj = GETObject("IIS://LocalHost/W3SVC/"+strWebNo+"/Root") set MyIPSec = SecObj.IPSecurity ' Make sure GrantByDefault=TRUE or your changes will not count. If (FALSE = MyIPSec.GrantByDefault) Then Response.Write "<BR>GrantByDefault was not TRUE. Setting to TRUE.<BR>" MyIPSec.GrantByDefault = TRUE End If IPList=MyIPSec.IPDeny if ubound(IPList)<0 then response.write "<BR>无数据,请先随便加一条<BR>" exit sub end if # intIPListCount=ubound(IPList)+1 # for i=0 to ubound(IPList) if strDenyIp = left(IPList(i),len(strDenyIp)) then response.write "<BR>重复数据。<BR>" exit sub end if next redim Preserve IPList(intIPListCount) IPList(intIPListCount)=strDenyIp response.write "新添加:" response.write strDenyIp response.write "<br>" MyIPSec.IPDeny = IPList SecObj.IPSecurity = MyIPSec SecObj.Setinfo end sub %> 上一篇:ASP Google的translate API代码 下一篇:ASP生成html的新方法 最新资源 群星《歌手2024 第3期》[FLAC/分轨][204.16MB] 群星《乘风2024 第6期》[320K/MP3][57.95MB] 群星《乘风2024 第6期》[FLAC/分轨][170.72MB] 陈立强1995-我爱你胜过这世界[福茂][WAV+CUE] 群星-《2014年十大发烧唱片精选HQCD》[低速原抓 群星2013-青春缤纷辑压箱宝大公开3CD2[新加坡限 林育群.2013-BalladShow(日本版)【环球】【WAV+ 陈加洛.1992-痛到感觉不到【宝丽金】【WAV+CUE】 群星.2023-宿命之敌电视剧原声带【韶愔音乐】【 東京事変-大発見[FLAC+CUE] 标签云1080P高清(5)高清电影(5)百度云盘(5)网盘下载(4)破解软件(4)绿色软件(4)磁力链接(3)强度天梯(3)福利资源(2)王者荣耀(2)黑钻活动(2)WPS会员(2)刷图排行(1)网盘限速(1)鬼灭之刃(1)免费韩国漫画(1)宫本重做(1)免费动漫(1)