modify script to obtain also SSID
'------------------8<-------------------------------------------------
' VBScript source code
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
Set Wmi = GetObject("winmgmts:{impersonationLevel=impersonat e}!root/wmi")
set scan = wmi.Get("MSNDis_80211_BssIdListScan")
set scanInst = scan.SpawnInstance_
scanInst.Active = True
scanInst.UnusedParameter = 0
scanInst.Put_
Set nicSet = Wmi.InstancesOf("MSNdis_80211_BSSIList")
For Each nic In nicSet
obset = nic.Ndis80211BSSIList
Text= ""
'------------------------------------------ MAC
For Each ob In obset
macAddr = ob.Ndis80211MacAddress
RSSI = ob.Ndis80211Rssi
macAddrStr = ""
For t = 0 To 5
macAddrStr = macAddrStr + Hex(macAddr(t)) + "."
Next
'------------------------------------------ SSID
ssidarr = ob.Ndis80211SsId
SSID = ""
set objSWbemServices = GetObject("winmgmts:\\.\root\wmi")
set colInstances = objSwbemServices.ExecQuery("SELECT * FROM
MSNdis_80211_BSSIList")
for each obj in colInstances
for each rawssid in obj.Ndis80211BSSIList
ssid = ""
for i=0 to ubound(rawssid.Ndis80211SSid)
decval = rawssid.Ndis80211Ssid(i)
if (decval > 31 AND decval < 127) then
ssid = ssid & Chr(decval)
end if
next
next
next
Next
wscript.echo SSID & " " & Text & "MAC:" & macAddrStr & " RSSI:" & RSSI &
" dBm" & vbCrLf
Text = SSID & " " & Text & "MAC:" & macAddrStr & " RSSI:" & RSSI & " dBm"
& vbCrLf
next
Set file = fso.OpenTextFile("wlan.txt", 2, True)
file.WriteLine(Text)
file.Close(
---------------------->8-------------------------------------------------------
miss info about encription (wep, Wpa) and used channel...
anyone want to help ?
m.