Display SSID on command line


S

spacemancw

Running XP SP2

also have CYGWIN_NT-5.1 installed
I need a way to display the SSID of the wireless network to which I'm
connected using the command line, DOS or Cygwin.

ipconfig /all gives some info but nothing about the wireless network.

I know on Vista I can use netsh on the command line as follows

netsh wlan show networks mode=bssid

however there is no 'wlan' option with netsh on XP.
I can't use a gui for this, I have to capture the SSID as text.
Clicking on my wireless network connection it shows the SSID, so that
info is there somewhere and must be able to be pulled out using some
command line utility.

Any ideas? ...... Or ..... where can I get the version of netsh
that's on Vista?

thanx
 
Ad

Advertisements

S

spacemancw

For anyone interested and looking for a similar solution I have the
best workaround I could figure out. Well I have 2 workarounds.
The reason I want the SSID is to find out if the PC is connected to my
network or a neighbour's. If connected to a neighbour's network then
break the connection. This is because my kids are always trying ways
to beat security on my network. But you could do this in other
situations.

1.) Schedule a script on the PC to run ipconfig and extract the
gateway.
Ping the gateway
do arp -a
compare the result of arp -a to the already known MAC address of your
router.
If they don't match do ipconfig /release.
Run this every minute or as you like.


2.) On the router config there should be a field for domain. Put your
SSID in that field.
On the PC in the ipconfig /all output there is a DNS suffix line where
that domain will be displayed.
With a similar script to the one above, extract that domain, if it is
not the one expected, disconnect.
Of course your SSID could be linksys and everyone in the neighbourhood
could be using linksys also.
The MAC address one is more specific cos every MAC address is unique.
But if using the SSID, set yourself an SSID which is unique as
possible.
The entry in the domain field on the router config doesn't even have
to be the SSID, it can be any identifiable one word (with dots if you
like but no spaces)
such as myrouter or myrouter.whatever.

Good luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top