以编程方式获取无线接入点列表 [英] Programmatically Get a List of Wireless Access Points

查看:102
本文介绍了以编程方式获取无线接入点列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个普遍的编程问题,但我更喜欢 Node.js - 解决方案。是否有任何JavaScript或.NET API用于检索无线接入点列表及其关联数据(SSID,MAC地址等)?我使用 TamperData 来查看当您与Firefox分享您的位置时发生的情况,并获取了此请求的URL: //maps.googleapis.com/maps/api/browserlocation/json?browser=firefox&sensor=true&wifi=mac:b8-c7-5d-07-6e-cf|ssid:TV2网络| ss:-58&的WiFi = MAC:00-13-10-8d-a7-32 | SSID:LUBIN | SS:-61&安培;无线= MAC:62-4c-FE-9C-08-18 | SSID:airportthru | SS:-73&安培; wifi = mac:00-24-93-0c-49-e0 | ssid:自订礼品孟菲斯| ss:-87& wifi = mac:98-fc-11-69-35-46 | ssid:linksys | ss: - 87安培;无线= MAC:00-0f-CC-6D-BA-AC | SSID:3333 | SS:-88&安培;无线= 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&安培;无线= MAC:06-02-6f-c3-06-27 | SSID:3333 | SS:-89&安培;无线= MAC:00-27-0d-55-C 3-20 | SSID:蛋奶| 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



......它在执行时返回一个JSON对象,它与我正在寻找的内容一致:经度和纬度坐标。这个例子的对象是:

$ b $准确性:49.0,
location:{
lat:35.06993630,
lng:-89.88568730
},
status:OK
}



CURIOUS:这里表示的准确度如何?我相当肯定这不是一个百分比,因为其他具有较少接入点的请求会返回一个更高的整数。例如,当移除除第一个列出的所有WAP时,我的准确性为 43000.0



我一直调查猎物 Node 版本与类似的Google服务交互的方式,并且遵循相同的通过WAPs列表和他们的信息。我试图提取他们完成这项任务的代码,但我甚至无法让项目正常运行。如果任何人有任何信息,我将不胜感激,因为我有一个使用这种技术的精彩项目。谢谢!

解决方案

这确实只能通过Java applet或主机上的应用程序实现。 Chrome和其他浏览器通过在用户计算机上安装应用程序来实现这一点。此应用程序通过Https请求安全地转发数据,并通过您的mac id ans ssid让Google说。 Google在此回复您对您所在位置的最佳猜测。

This is a general programming question although I would prefer a Node.js-geared solution. Are there any JavaScript or .NET APIs for retrieving a list of wireless access points and their associated data (SSID, MAC address, etc.)? I used TamperData to see what happens when you share your location with Firefox and got 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 with exactly what I'm seeking: latitude and longitude coordinates. The object for this example is:

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

CURIOUS: how is the accuracy here represented? I am fairly certain it's not a percentage because other requests with less access points listed return a higher integer. For example, when removing every WAP except the first listed, I get an accuracy of 43000.0.

I have been investigating the way the Node version of prey interacts with a similar Google service and it follows the same suit of passing a list of WAPs and their info. I am trying to extract the bits of their code that accomplish this task but I am having trouble even getting the project to run properly. If anyone has any information, I would greatly appreciate it, as I have a wonderful project in mind that makes use of such technology. Thanks!

解决方案

This is truly only capable through Java applet or an application on the host computer. Chrome and other browsers achieve this by having an application on the users computer. This application forwards the data securely through an Https request and passes your mac id ans ssid to lets say Google. Here Google replies with its best guess on your location.

这篇关于以编程方式获取无线接入点列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆