Tool overview
Sparrow-wifi is essentially a WiFi spectrum sensing tool for the next generation of 2.4GHz and 5GHz. It not only provides a GUI graphical user interface, but also has more comprehensive functions, which can replace Linux tools like inSSIDer and linssid. In its most complete usage scenario, Sparrow-wifi can integrate WiFi, software-defined radio (hackrf), advanced Bluetooth tools, traditional GPS (gpsd) and roaming GPS (mavlink) into one solution.
The tool is developed entirely using Python3 and is suitable for the following scenarios:
1. Basic WiFi SSID identification;
2. WiFi source capture;
3. 2.4GHz and 5GHz spectrum viewing;
4. Bluetooth recognition;
5. Bluetooth source capture;
6. iBeacon broadcasting;
7. Remote operation (via GUI);
8. It can be mounted to drones and supports Raspberry Pi;
9. The remote agent is based on JSON and can be integrated into other applications;
10. CSV and JSON data export/import;
11. Google map can be generated according to GPS coordinates;
Tool running screenshot
Sparrow-wifi main panel, perform basic WiFi scanning:
WiFi and Bluetooth tracking:
Tool installation
Sparrow-wifi uses Python3, qt5 and qtchart to build the UI interface. On the standard Debian-based platform, it already comes with Python3 and qt5. You only need to configure qtchart separately. Execute the following commands on Ubuntu and Kali Linux:
sudo apt-get install python3-pip gpsd gpsd-clients python3-tk python3-setuptools
sudo pip3 install QScintilla PyQtChart gps3 dronekit manuf python-dateutil numpy matplotlib
Of course, you can also use this tool in a Python virtual environment (virtualenv):
git clone https://github.com/ghostop14/sparrow-wifi
cd sparrow-wifi
virtualenv --python=python3 $HOME/sparrow
source $HOME/sparrow/bin/activate
pip3 install gps3 python-dateutil requests pyqt5 pyqtchart numpy matplotlib
sudo python3 sparrow-wifi.py
Tool running
This tool needs to use the standard command line tool “iw” to perform WiFi scanning, so we need to use root privileges to run:
sudo ./sparrow-wifi.py
GPS communication
Sparrow-wifi provides standard GPS communication functions based on gpsd. We can use the following commands to perform a quick GPS test:
gpsd -D 2 -N /dev/ttyUSB0
Run Sparrow-wifi remote agent
Since the permissions required by the agent are the same as the running permissions of the GUI tool, we also need to use root permissions here:
sudo ./sparrowwifiagent.py
In the default configuration, the proxy will listen on port 8020. We can also use the following commands to specify other ports:
sudo ./sparrowwifiagent.py --port=<myport>
Help menu
We can use the –help command to view the help menu and parameter options of Sparrow-wifi:
usage: sparrowwifiagent.py [-h] [--port PORT] [--allowedips ALLOWEDIPS]
[--mavlinkgps MLINKGPS] [--sendannounce]
[--userpileds] [--recordinterface RECORDINTERFACE]
[--ignorecfg] [--cfgfile CFGFILE]
[--delaystart DELAYSTART]
Sparrow-wifi agent
optional arguments:
-h, --help show this help message and exit
--port PORT Port for HTTP server to listen on
--allowedips ALLOWEDIPS
IP addresses allowed to connect to this agent. Default
is any. This can be a comma-separated list for
multiple IP addresses
--mavlinkgps MLINKGPS
Use Mavlink (drone) for GPS. Options are: '3dr' for a
Solo, 'sitl' for local simulator, or full connection
string ('udp/tcp:<ip>:<port>' such as:
'udp:10.1.1.10:14550')
--sendannounce Send a UDP broadcast packet on the specified port to
announce presence
--userpileds Use RPi LEDs to signal state. Red=GPS
[off=None,blinking=Unsynchronized,solid=synchronized],
Green=Agent Running [On=Running, blinking=servicing
HTTP request]
--recordinterface RECORDINTERFACE
Automatically start recording locally with the given
wireless interface (headless mode) in a recordings
directory
--ignorecfg Don't load any config files (useful for overriding
and/or testing)
--cfgfile CFGFILE Use the specified config file rather than the default
sparrowwifiagent.cfg file
--delaystart DELAYSTART
Wait <delaystart> seconds before initializing
Raspberry pie
We can use the following commands to install and build the tools on the Raspberry Pi:
sudo apt-get install libsqlite3-dev
cd /tmp
wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz
tar -zxvf Python-3.5.5.tgz
cd Python-3.5.5
./configure && make -j3 && sudo make install
After completion, install other dependent modules:
sudo pip3.5 install gps3 dronekit manuf python-dateutil
Next, directly use the following command to run the agent:
/usr/local/bin/python3.5 ./sparrowwifiagent.py
/usr/local/bin/python3.5 ./sparrowwifiagent.py --mavlinkgps=3dr --recordinterface=wlan0
Project address: https://github.com/ghostop14/sparrow-wifi
Reviews
There are no reviews yet.