Skip to content

Instantly share code, notes, and snippets.

@ober
Created August 14, 2011 03:06
Show Gist options
  • Save ober/1144514 to your computer and use it in GitHub Desktop.
Save ober/1144514 to your computer and use it in GitHub Desktop.
# To generate a script to use Wireshark command line tshark to read nfs/portmap/mount traffic
# Need to be root to run.
tshark -G|grep -Ei "portmap|mount|nfs"|awk -F"\t" '{print $3}'|sort -u|awk -v v="'" 'BEGIN{ print "tshark -Nn -tad -R \"nfs || portmap || mount\"" } {print "-z \"proto,colinfo,"$1","$1"\"" } END{ print "|sed -e " v "s# == #:#g" v }' |tr "\n" " " > readnfs && chmod +x readnfs && ./readnfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment