Skip to content

Instantly share code, notes, and snippets.

@JburkeRSAC
Created January 19, 2017 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JburkeRSAC/25e59a61c16a913c9c4669cedcebe5b8 to your computer and use it in GitHub Desktop.
Save JburkeRSAC/25e59a61c16a913c9c4669cedcebe5b8 to your computer and use it in GitHub Desktop.
A Linux 1 liner utilizing nmcli for triangulation via SSID,BSSID, and RSSI
#!/bin/bash
curl "https://maps.googleapis.com/maps/api/browserlocation/json?browser=firefox&sensor=true" --data-urlencode "`nmcli -f SSID,BSSID,SIGNAL dev wifi list |perl -ne "if(s/^(.+?)\s+(..:..:..:..:..:..)\s+(.+?)\s*$/&wifi=mac:\2|ssid:\1|ss:\3&/g){print;}"`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment