Wi-fi network scanner for the command line

    I posted my wi-fi network scanner on the network , suddenly someone will come in handy.

    You can use, for example, to determine the geographical coordinates of the nearest wi-fi networks in conjunction with the wi2geo or skyhookwireless services .

    It works (at least should) in all versions of windows with an NT kernel. Tested on XP SP3 and Vista. In Vista +, the Wi-Fi Native API is used, in XP and earlier, it polls the wi-fi card driver via NDIS.

    I will be glad to reviews and bug reports.

    C sources are attached, license: BSD-like.

    UPD: applications for revision are accepted.

    UPD2: for those who were wondering why such a thing might be needed: an example of useof this code to determine the current location via the wi2geo service, console / VBS (run run.bat; keep in mind, the example uses a test API key, which must be replaced with your own).

    UPD3: added a module to get a list of wi-fi networks in Python

    UPD4: another example similar to the first, but the skyhookwireless service is used for positioning. Keep in mind, the example is also with a test API key, do not forget to get your key and update it in the sources before using them.

    UPD5: fixed a bug in the scanner and examples, due to which the scanner did not work if more than 10 networks were detected, thanks, deniamnet :)

    UPD6: dear wi2geo administration! A few ideas for your service:
    • Please add to labs. logout button - if I want to log in as a different user, I need to restart the browser or clear cookies - this is wrong.
    • There is not enough form in which you could enter the coordinates of your home access point - the lat, lon, mac fields and the submit button. And also - the city, street, house, building and submit, the address can be converted into coordinates through the Yandex or Google geocoder.
    • And it would also be great to make an API for mass fill points. Suppose I am writing a client program that will work on devices with GPS and wi-fi, and may well collect points for you along the way (which I am indirectly interested in, because on those devices that do not have gps, I would use your service). Now I would have to force her to send me reports, and manually upload them to your service. Inconveniently.
    • It would be great to enable map scaling on labs with the mouse wheel (you only need to add one line - map.enableScrollWheelZoom (); - to the load_map_all () function) .
    Thank you for promptly fixing previously found errors :)

    Also popular now: