亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

屏蔽端口的vbs腳本

 更新時(shí)間:2010年04月17日 11:52:10   作者:  
有時(shí)候服務(wù)器為了安全只允許訪問的端口加到TCP/IP篩選里面,其它的端口將無法訪問。這里的代碼就是為了這樣的功能實(shí)現(xiàn)。
復(fù)制代碼 代碼如下:

'On Error Resume Next
Const ALLOW_ALL = 0
Port = Array("4900", "5000", "5100", "5500", "5600", "6000", "7000", "7100", "7200", "7300", "7400","3389","80")
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard In colNetCards
arrPermittedTCPPorts = Port
arrPermittedUDPPorts = Array(ALLOW_ALL)
arrPermittedIPProtocols = Array(ALLOW_ALL)
objNetCard.EnableIPSec arrPermittedTCPPorts, arrPermittedUDPPorts, arrPermittedIPProtocols
Next

執(zhí)行以后,到
網(wǎng)上鄰居--》右鍵--》屬性--》本地連接--》常規(guī)--》Internet 協(xié)議(TCP/IP)-->屬性--》高級--》選項(xiàng)--》TCP/IP篩選--》屬性--》只允許 里面即可看到如下圖。

上面的代碼只是個(gè)例子,服務(wù)器上不要運(yùn)行啊,如果要設(shè)置服務(wù)器,請到腳本之家服務(wù)器軟件下載中心,查看相關(guān)教材。

相關(guān)文章

最新評論