濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > ADSI+ASP添加IP到IIS禁止訪問(wèn)列表中

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

熱門標(biāo)簽:地圖標(biāo)注宅基地 騰訊地圖標(biāo)注商戶關(guān)閉 徐州人工智能電銷機(jī)器人好用嗎 外呼系統(tǒng)還用卡么 地圖標(biāo)注服務(wù)哪家好 武漢營(yíng)銷電話機(jī)器人軟件 長(zhǎng)沙防封電銷卡品牌 西寧公司外呼系統(tǒng)平臺(tái) 智能電銷機(jī)器人適用于哪些行業(yè)
復(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
%>
您可能感興趣的文章:
  • ASP.net做的IP訪問(wèn)限制
  • 用ASP代碼實(shí)現(xiàn)對(duì)IP的訪問(wèn)限制的代碼
  • Asp下實(shí)現(xiàn)限制IP訪問(wèn)的程序代碼
  • 用asp腳本實(shí)現(xiàn)限制IP訪問(wèn)
  • 推薦的用Asp實(shí)現(xiàn)屏蔽IP地址訪問(wèn)的代碼
  • 記錄游客頁(yè)面訪問(wèn)IP的簡(jiǎn)易實(shí)現(xiàn)代碼 (asp.net+txt)
  • 通過(guò)ASP禁止指定IP和只允許指定IP訪問(wèn)網(wǎng)站的代碼
  • Asp限制IP訪問(wèn) 阻止某一個(gè)IP段禁止訪問(wèn)本站的代碼
  • asp實(shí)現(xiàn)限制一個(gè)ip只能訪問(wèn)一次的方法

標(biāo)簽:通遼 普洱 鷹潭 雅安 運(yùn)城 巴彥淖爾 荊門 通化

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《ADSI+ASP添加IP到IIS禁止訪問(wèn)列表中》,本文關(guān)鍵詞  ADSI+ASP,添加,到,IIS,禁止,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《ADSI+ASP添加IP到IIS禁止訪問(wèn)列表中》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于ADSI+ASP添加IP到IIS禁止訪問(wèn)列表中的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    安溪县| 镇安县| 安阳县| 清河县| 连云港市| 崇仁县| 宁津县| 许昌市| 平湖市| 北宁市| 柯坪县| 赤水市| 江北区| 贵溪市| 黎城县| 军事| 绥化市| 大理市| 朝阳市| 视频| 淮安市| 浪卡子县| 朝阳县| 信丰县| 临泉县| 鄂州市| 榕江县| 浪卡子县| 乌苏市| 彰化县| 大足县| 上犹县| 杭州市| 乌什县| 宜宾县| 阿尔山市| 佛山市| 普兰店市| 汉阴县| 商都县| 南澳县|