开发者

How to scan the wireless devices which exist on the network

开发者 https://www.devze.com 2022-12-22 01:25 出处:网络
Now开发者_Go百科 my team working in a network project using windows application c#. How to scan the wireless devices which exist on the network.The functionality is exactly the same thing that you se

Now开发者_Go百科 my team working in a network project using windows application c#.

How to scan the wireless devices which exist on the network.The functionality is exactly the same thing that you see in the existing windows utilities within the windows operating system. I'm sure you experienced when you plug a wireless laptop card in, it brings up a window that shows you all of the access points it detects for connecting to. How to capture this information listed below

  • MAC Address
  • IP Address
  • SSID
  • Channel
  • Timestamp
  • Cipher type
  • Encryption level
  • Signal Strength

Did i use Kismet or NetStumbler. Please suggest good library/code


You could use the Managed Wifi API. It's just a wrapper for the Native Wifi Api, which is available to Windows XP and later versions.

This code should show the available networks:

WlanClient client = new WlanClient();
foreach ( WlanClient.WlanInterface wlanIface in client.Interfaces )
{
    // Lists all available networks
    Wlan.WlanAvailableNetwork[] networks = wlanIface.GetAvailableNetworkList( 0 );
    foreach ( Wlan.WlanAvailableNetwork network in networks )
    {                     
        Console.WriteLine( "Found network with SSID {0}.", GetStringForSSID(network.dot11Ssid));
    }
}

static string GetStringForSSID(Wlan.Dot11Ssid ssid)
{
    return Encoding.ASCII.GetString( ssid.SSID, 0, (int) ssid.SSIDLength );
}


if you are ready to invest money then u can use WiFi-Manager/Advanced WiFi-Manager

WiFi-Manager is a developer tool that allows you to manage WiFi connections and settings in Windows XP SP2 and Windows Vista using one set of API functions, although these versions of Windows use absolutely different APIs for wireless network management. Also, WiFi-Manager provides a COM interface for all API functions so you can simply control WiFi settings from VB or such .NET languages as VB.NET or C#.

WiFi-Manager contains functions for enumerating WiFi adapters, enumerating available networks and getting their settings, functions for connecting and disconnecting to networks, functions for working with wireless networks profiles, etc.

Advanced WiFi-Manager is a next-generation tool, it supports all features WiFi-Manager has but also can use NDIS to manage WiFi adapters and works in Windows 2000/2003/XP/Vista/Windows7 and has no dependencies on Service Packs or hotfixes installed!

I hope this is useful


You should use native WiFi API for that. There are set of functions which you need to use first of all

  • openhandler()
  • getEnuminterface() - here you will get GUID of your WiFi hardware
  • wlanscann()
  • wlangetavailablenetworklist() -here as output you will get a structure where you can find all above information.
  • closehandler()

Just dig into native WiFi and you will get all information.

Starting with Windows 8.1 and Windows Server 2012 R2, use Wi-Fi Direct instead.


You may start from this "How to programmatically detect wi-fi routers and signal strength?"

0

精彩评论

暂无评论...
验证码 换一张
取 消