Salaheldin

OSINT

Oct. 25, 2020

Wigle to Google earth

Getting the Wigle data in JSON format

We will start by using Wigle API to download the data:

To know about Wigle basic usage check OSINTCurious blog post : https://osintcurio.us/2019/01/15/tracking-all-the-wifi-things/amp/

1) Go to https://wigle.net/account and log to your account:

wigle_g_1.jpg

2) Click show my tokens

wigle_g_3.jpg


3) In new tab open https://api.wigle.net/swagger

wigle_g_5.jpg

4) Click Authorize button on the right

5) Copy the API Name and API Token from first tab into the username and password inputs (respectively) in the Basic Authentication dialog then click Authorize.

wigle_g_6.jpg

6) Scroll down until you find Network search and information tools and click it

wigle_g_7.jpg

7) Select /api/v2/network/search then Click Try it out button:

wigle_g_8.jpg

8) Fill the search details: You can use https://wigle.net/mapsearch to find search and get specific address longitude and Latitude

wigle_g_9.jpg

9) Click Execute

The result per request is limited: Defaults to 25 for COMMAPI, 100 for site. Bounded at 1000 for COMMAPI, 100 for site. You can use searchAfter parameter to download multiple result pages.

wigle_g_14.jpg

10) Click Download

Now You have the result in JSON format file and we need to convert it to KML/KMZ to use it in Google earth.


KML

KML is an acronym for Keyhole Markup Language developed by Google and Keyhole, Inc. KMZ is the zipped version of a KML file.

Both KML and KMZ are file extensions used in Google applications, specifically Google Earth and Google Maps.

https://en.wikipedia.org/wiki/Keyhole_Markup_Language
https://developers.google.com/kml/documentation

The line below shows a minimal KML file:

    
        <?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
  <Placemark>
    <name>New York City</name>
    <description>New York City</description>
    <Point>
      <coordinates>-74.006393,40.714172,0</coordinates>
    </Point>
  </Placemark>
</Document>
</kml>
    


Conversion

To convert JSON to KML, we will convert each parameter as following:

  • ssid > name
  • trilat, trilong > coordinates
  • all the remaining details > description

Also we can add shared style to change the default icon for the placemark. I usually use https://www.iconfinder.com/ for icons as it's easy to just copy icon URL .

wigle_g_18.jpg

Example of shared style code:

    
        <Style id="SharedStyle">
            <IconStyle>
                <Icon>
                    <href>http://maps.google.com/mapfiles/kml/shapes/shaded_dot.png</href>
                </Icon>
            </IconStyle>
        </Style>
    

Method 1 :

1) Convert JSON to CSV using this tool: http://convertcsv.com/json-to-csv.htm

wigle_g_15.jpg

2) Copy or download the result (CSV) to use it in the next tool.

3) Convert CSV to KMl using this tool: http://convertcsv.com/csv-to-kml.htm . Enter fields number as following:

wigle_g_16.jpg


Method 2:

Using python module simplekml .

I wrote a script to convert Wigle JSON to KML : https://github.com/salaheldinaz/wiglejson2kml

wigle_g_social.jpg

wigle_g_22.jpg

wigle_g_19.jpg

Enjoy!