麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁(yè) > 編程 > ASP > 正文

ADSI+ASP添加IP到IIS禁止訪問(wèn)列表中

2024-05-04 11:09:03
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
注意:執(zhí)行的ASP文件需要管理員權(quán)限
 
 
 
復(fù)制代碼代碼如下:

<%@ 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="確定發(fā)送"> 
</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>無(wú)數(shù)據(jù),請(qǐng)先隨便加一條<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>無(wú)數(shù)據(jù),請(qǐng)先隨便加一條<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>重復(fù)數(shù)據(jù)。<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 
%>

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 久久成人综合网 | 国产午夜网| 国产亚洲精品久久久久婷婷瑜伽 | 色综合视频网 | 激情av在线 | 成人免费乱码大片a毛片视频网站 | 国产流白浆高潮在线观看 | 久久久久久久久久久久免费 | 国产免费最爽的乱淫视频a 毛片国产 | 青草伊人网 | 久久久久久91 | av在线免费观看中文字幕 | 青青草免费观看 | 草逼一区 | 黄色a级片免费观看 | 免费a级片在线观看 | 55夜色66夜色国产精品视频 | 亚洲第一男人天堂 | 亚洲第一成人在线视频 | 免费h片| 人成免费a级毛片 | 欧美性受ⅹ╳╳╳黑人a性爽 | 综合图区亚洲 | 精品人伦一区二区三区蜜桃网站 | 亚洲成人久久精品 | 亚洲午夜不卡 | 国产精品免费一区二区三区四区 | 国产精品视频免费在线观看 | 亚洲性爰 | 国产乱一区二区三区视频 | 337p日本欧洲亚洲大胆精蜜臀 | 蜜桃欧美性大片免费视频 | 国产影视 | 精品亚洲夜色av98在线观看 | 国产精品久久久久影院老司 | 欧美三级日本三级少妇99 | 日本a v免费观看 | 激情久久免费视频 | 久久久久久久网站 | 亚洲第一色片 | 欧美成人午夜 |