Skip to content

Instantly share code, notes, and snippets.

@pocc
Last active November 10, 2018 07:07
Show Gist options
  • Select an option

  • Save pocc/7e922648cf7ade9ad3357ea59ee71bb2 to your computer and use it in GitHub Desktop.

Select an option

Save pocc/7e922648cf7ade9ad3357ea59ee71bb2 to your computer and use it in GitHub Desktop.
This one liner will show the average signal noise and signal strength of all packets in an 802.11 packet capture.
#!/bin/bash
tshark -r <YOUR_WIRELESS_CAPTURE> -T fields -e "radiotap.dbm_antsignal" -e "radiotap.dbm_antnoise" \
| awk '{ sum_signal += $1; sum_noise += $2; n++ } END { if (n > 0) print '\
'"\n802.11 Avgs (dbm)\n=================\nSignal: " sum_signal / n "\nNoise: " sum_noise / n ; }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment