Created
April 22, 2014 13:30
-
-
Save zackdouglas/11179325 to your computer and use it in GitHub Desktop.
sniff network traffic on a given interface and displays the IP addresses of the machines communicating with the current host (one IP per line)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netsniff () { | |
sudo tcpdump -i wlan0 -n ip | \ | |
awk '{ print gensub(/(.*)\..*/,"\\1","g",$3), $4, gensub(/(.*)\..*/,"\\1","g",$5) }' | \ | |
awk -F " > " '{print $1"\n"$2}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment