Kamis, 24 Juni 2010
0
[VBS] Memunculkan Daftar Semua Port Terbuka Di Firewall
Dim iobjFWall, objPolicy, objPort, colPorts, strPorts
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
Set colPorts = objPolicy.GloballyOpenPorts
For Each objPort in colPorts
strPorts=strPorts & "Port name: " & objPort.Name & vbcrlf
strPorts=strPorts & "Port number: " & objPort.Port & vbcrlf
strPorts=strPorts & "Port IP version: " & objPort.IPVersion & vbcrlf
strPorts=strPorts & "Port protocol: " & objPort.Protocol & vbcrlf
strPorts=strPorts & "Port scope: " & objPort.Scope & vbcrlf
strPorts=strPorts & "Port remote addresses: " & objPort.RemoteAddresses & vbcrlf
strPorts=strPorts & "Port enabled: " & objPort.Enabled & vbcrlf
strPorts=strPorts & "Port built-in: " & objPort.Builtin & vbcrlf
Next
MsgBox strPorts
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
Set colPorts = objPolicy.GloballyOpenPorts
For Each objPort in colPorts
strPorts=strPorts & "Port name: " & objPort.Name & vbcrlf
strPorts=strPorts & "Port number: " & objPort.Port & vbcrlf
strPorts=strPorts & "Port IP version: " & objPort.IPVersion & vbcrlf
strPorts=strPorts & "Port protocol: " & objPort.Protocol & vbcrlf
strPorts=strPorts & "Port scope: " & objPort.Scope & vbcrlf
strPorts=strPorts & "Port remote addresses: " & objPort.RemoteAddresses & vbcrlf
strPorts=strPorts & "Port enabled: " & objPort.Enabled & vbcrlf
strPorts=strPorts & "Port built-in: " & objPort.Builtin & vbcrlf
Next
MsgBox strPorts
Langganan:
Posting Komentar (Atom)
0 Komentar Untuk “[VBS] Memunculkan Daftar Semua Port Terbuka Di Firewall”
Posting Komentar
Berikan komentar positif tentang artikel yang sederhana ini niscaya sobat akan mendapatkan balasannya. Hehehe