views:

686

answers:

2

Is there a way to get a list of all SSID's and their mac address of reachable signals in my area?

I tried the Nativ WlanApi in my c# code. What I get is the list of all ssid's, but for getting their mac address, I don't have any idea.

This is the code I using for getting the list:

private void show_all_ssids_Click(object sender, EventArgs e)
{
  WlanClient client = new WlanClient();
  foreach ( WlanClient.WlanInterface wlanIface in client.Interfaces )
  {
    // Lists all available networks
    Wlan.WlanAvailableNetwork[] networks = wlanIface.GetAvailableNetworkList( 0 );
    this.ssidList.Text = "";
    foreach ( Wlan.WlanAvailableNetwork network in networks )
    {                    
      //Trace.WriteLine(  GetStringForSSID(network.dot11Ssid));
      this.ssidList.Text += GetStringForSSID(network.dot11Ssid) + "\r\n";
    }
  }
}
static string GetStringForSSID(Wlan.Dot11Ssid ssid)
{
  return Encoding.ASCII.GetString(ssid.SSID, 0, (int)ssid.SSIDLength);
}

I hope there is a way.

A: 

In order to get a MAC address you would need to connect to that wireless network. Once you are connected you should be able to get the MAC address of machines on the immediate network using the same methods that you might for traditional wired networks - I believe that the best way of doing that would be by parsing the output of the arp -a command.

Kragen
A: 

Hey Kragen,

thank you for answere. Fact is, there are tools, they deliver the mac address of Access-Points and Routers although the work machine is not connected to this each AP and Routers. How they can do that?

isicom