/
jsonviewwigle
66 lines (54 loc) · 1.68 KB
/
jsonviewwigle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#! /usr/bin/python3
# -*- coding: utf-8 -*-
# CSI Linux JSON Scraper for Wigle
# Copyright (C) 2021 the CSI Linux Team
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
"""A simple web page scraper for evidence capture.
Author: Jeremy Martin
Date: 6/01/2021
"""
import sys
import getopt
import json
import webbrowser
# Opening JSON file
f = open(sys.argv[1],'r')
# returns JSON object as
# a dictionary
data = json.load(f)
# Iterating through the json
# list
maps="https://www.google.com/maps/dir/"
for i in data['results']:
#print(i)
ssidval=str(i['ssid'])
netidval=str(i['netid'])
encryptionval=str(i['encryption'])
trilongval=str(i['trilong'])
trilatval=str(i['trilat'])
lastupdtval=str(i['lastupdt'])
housenumberval=str(i['housenumber'])
roadval=str(i['road'])
cityval=str(i['city'])
postalcodeval=str(i['postalcode'])
stateval=str(i['region'])
countryval=str(i['country'])
print("SSID: " + ssidval)
print("BSSID|MAC Address: " + netidval)
print("Last Seen: " + lastupdtval)
print("Latitude: " + trilatval)
print("Longitude: " + trilongval)
print("Google Maps Link: https://www.google.com/maps/?q=" + trilatval + ","+ trilongval)
print("Likely Address: " + housenumberval + " " + roadval)
print(" " + cityval + " " + postalcodeval + ", " + stateval + " " + countryval)
print("---")
maps=maps + trilatval + ","+ trilongval + "/"
maps=maps + "/@" + trilatval + ","+ trilongval + ",3z"
print(maps)
webbrowser.get("/usr/bin/google-chrome-stable").open(maps)
# Closing file
f.close()