Skip to content

Commit

Permalink
Add check for presence of gawk and update README to describe gawk as …
Browse files Browse the repository at this point in the history
…a dependency. Close brannondorsey#3.
  • Loading branch information
brannondorsey committed Jul 19, 2018
1 parent f127a6a commit 691b5f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ IFACE=wlan0 ./sniff-probes.sh
00:01:13 -87dBm 38:63:bb:d1:6a:b7 "offline"
00:01:25 -83dBm 5c:aa:fd:20:23:41 "Sonos_pZkIex0zatRvhdJTAifLzmatdh"
```
Requires tcpdump and awk (installed on many *nix systems by default). Wireless device must support monitor mode.
Requires **tcpdump** and **gawk** (GNU awk). Both of these packages are installed on many *nix systems by default, but if they aren't you will have to install them manually. Your wireless device must also support monitor mode. Here is [a list of WiFi cards that support monitor mode](https://www.wirelesshack.org/best-kali-linux-compatible-usb-adapter-dongles-2016.html) (2018).

Prints `timetamp`, `signal strength`, `sender MAC address` and `SSID` to screen. Saves output as a space-delimeted "csv" to `probes.txt` by default.

Expand Down
5 changes: 5 additions & 0 deletions sniff-probes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ channel_hop() {
done
}

if ! [ -x "$(command -v gawk)" ]; then
echo 'gawk (GNU awk) is not installed. Please install gawk.' >&2
exit 1
fi

if [ -z "$IFACE" ] ; then
echo "IFACE env variable must be set. Type \"ifconfig\" to view network interaces."
exit 1
Expand Down

0 comments on commit 691b5f2

Please sign in to comment.