Programmatically get a list of wireless access points

This is a general programming issue, although I would prefer a Node.js solution. Are there any JavaScript or .NET APIs to retrieve a list of wireless access points and their associated data (SSID, MAC address, etc.)? I used TamperData strong> to find out what happens when you share your location with Firefox and get this request url:

https://maps.googleapis.com/maps/api/browserlocation/json?browser=firefox&sensor=true&wifi=mac:b8-c7-5d-07-6e-cf|ssid:TV2 Network|ss:-58&wifi=mac:00-13-10-8d-a7-32|ssid:LUBIN|ss:-61&wifi=mac:62-4c-fe-9c-08-18|ssid:airportthru|ss:-73&wifi=mac:00-24-93-0c-49-e0|ssid:Custom Gifts Memphis|ss:-87&wifi=mac:98-fc-11-69-35-46|ssid:linksys|ss:-87&wifi=mac:00-0f-cc-6d-ba-ac|ssid:3333|ss:-88&wifi=mac:40-b7-f3-5b-2c-60|ssid:ATT456|ss:-88&wifi=mac:00-c0-02-7d-5f-4e|ssid:iHub_0060350392e0|ss:-89&wifi=mac:00-24-b2-d5-df-9a|ssid:Memphis CPA|ss:-89&wifi=mac:06-02-6f-c3-06-27|ssid:3333|ss:-89&wifi=mac:00-27-0d-55-c3-20|ssid:custard|ss:-90&wifi=mac:a2-a1-15-0d-a8-68|ssid:SETUP|ss:-90&wifi=mac:00-0f-cc-76-5b-2c|ssid:3545 2340|ss:-92&wifi=mac:c0-3f-0e-6e-ac-34|ssid:patricia|ss:-92

... which, when executed, returns a JSON object exactly what I'm looking for: latitude and longitude coordinates. The object for this example:

{ "accuracy" : 49.0, "location" : { "lat" : 35.06993630, "lng" : -89.88568730 }, "status" : "OK" }

CURIOUS: how is accuracy represented here? I am sure this is not a percentage because other requests with fewer access points return a higher integer. For example, when deleting each WAP, except the first, I get an accuracy of 43000.0 .

I’m learning how Node prey interacts with a similar Google service and it follows the same example of passing the WAP list and their information. I am trying to extract bits of my code that perform this task, but I am having problems even with the project working correctly. If anyone has any information, I would really appreciate it, because I have a wonderful project that uses this technology. Thanks!

+4
source share
2 answers

This is really only possible through a Java applet or application on the host computer. Chrome and other browsers achieve this by having an application on the user's computer. This app reliably transmits data using an Https request and passes your mac ssid ssid id to tell google. Here Google responds with its best guess about your whereabouts.

+5
source

node_wifi_location npm-package receives a list of available wireless access points from a wireless card of local computers and, optionally, passes them to Google to find the location of the machine. He relies on wifi command-line utilities for the operating system, since each platform has its own APIs for accessing Wi-Fi equipment. In any browser, there is no JavaScript API to retrieve a list of access points, but only an API to search for a location ( HTML5 geolocation API ).

 var wifiLocation = require('wifi_location'); wifiLocation.wifiTowers(function (err, accessPoints) { // accessPoints contains an array of access point objects // with ssid, mac_address, signal_strength keys }); wifiLocation.location(function (err, location) { // location contains the location object from the Google Maps API }); 
+1
source

Source: https://habr.com/ru/post/1432521/


All Articles