How it works...

First, we import the required libraries to handle argument parsing, writing spreadsheets, processing XML data, and interacting with the WiGLE API:

from __future__ import print_functionimport argparseimport csvimport osimport sysimport xml.etree.ElementTree as ETimport requests

This recipe's command-line handler accepts two positional arguments, INPUT_FILE and OUTPUT_CSV, representing the input file with Wi-Fi MAC addresses and the desired output CSV, respectively. By default, the script assumes the input file is a Cellebrite XML report. The user can specify the type of the input file using the optional -t flag and choose between xml or txt. Additionally, we can set the path of the file containing our API key. By default, this ...

Get Python Digital Forensics Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.