Re: Tutorial: Query the Apple database with Python for your access point BSSID
Marian <[email protected]>
| Newsgroups | alt.comp.os.windows-10,alt.internet.wireless,alt.comp.microsoft.windows,alt.comp.os.windows-11 |
|---|---|
| Organization | BWH Usenet Archive (https://usenet.blueworldhosting.com) |
| Message-ID | <[email protected]> |
Marian wrote:
> Here is a display of just 400 for an arbitrary Netgear BSSID.
> <https://i.postimg.cc/43ysV3Mr/fermium.jpg>
Here is code I hacked out this morning which tracks those 400 BSSID:GPS
pairs, where I set the distance to 100KM but it could be any distance.
If I can write this code, certainly anyone can (since I'm not a coder).
That's the scary part about how easy Apple makes the entire WPS DB
available to anyone in the world without any restrictions whatsoever.
@echo off
:: This is C:\app\os\python\apple_bssid_locator\bssidcompare.bat
:: v1p0 20251215
:: Outputs if there is movecment for any given BSSID in results.txt
setlocal enabledelayedexpansion
:: Threshold for movement (where 0.001 degrees is roughly 100 kilometers)
set THRESH=0.001
:: Input file collected using apple_bssid_locator open source code
:: These are actual BSSID:GPS pairs which you can test yourself!
:: 28:6d:97:c8:5a:30 35.2948265 126.77577972
:: 00:22:3f:a5:7b:33 35.29422378 126.77641296
:: 10:62:e5:b1:8f:12 35.29444885 126.77671051
:: 12:09:a5:53:df:13 35.29491043 126.77599334
:: 28:6d:97:4f:be:d0 35.29439163 126.77655029
:: 28:6d:97:b9:89:96 35.29463195 126.77554321000001
:: 42:09:a5:53:df:13 35.294940940000004 126.7760086
set INFILE=results.txt
echo Checking for GPS movement greater than %THRESH% degrees...
echo.
:: Loop through each line of results.txt
for /f "tokens=1,2,3 delims= " %%A in (%INFILE%) do (
set BSSID=%%A
set LAT=%%B
set LON=%%C
:: If we've seen this BSSID before, compare
if defined lastLAT[!BSSID!] (
set /a diffLAT=1000000*( !LAT! - !lastLAT[!BSSID!]! )
set /a diffLON=1000000*( !LON! - !lastLON[!BSSID!]! )
:: Convert to absolute values
if !diffLAT! lss 0 set /a diffLAT=-!diffLAT!
if !diffLON! lss 0 set /a diffLON=-!diffLON!
:: Compare against threshold (scaled by 1,000,000)
set /a threshScaled=%THRESH%*1000000
if !diffLAT! gtr !threshScaled! (
echo BSSID !BSSID! moved in LAT by more than %THRESH% degrees
)
if !diffLON! gtr !threshScaled! (
echo BSSID !BSSID! moved in LON by more than %THRESH% degrees
)
)
:: Store current coordinates
set lastLAT[!BSSID!]=!LAT!
set lastLON[!BSSID!]=!LON!
)
echo.
echo Comparison complete.
endlocal
:: end of C:\app\os\python\apple_bssid_locator\bssidcompare.bat
--
If I can do this, anyone can.