Skip to content

Instantly share code, notes, and snippets.

@harshavardhana
Last active December 19, 2015 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harshavardhana/5922600 to your computer and use it in GitHub Desktop.
Save harshavardhana/5922600 to your computer and use it in GitHub Desktop.
Sharking network traffic
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Please provide the pcap file for sharking.."
exit 255
fi
capinfos $1 1>/dev/null 2>/dev/null
if [ $? -eq 1 ]; then
echo "Capinfos detected wrong pcap file or file does not exist"
echo "Please provide the right pcap file for sharking.."
exit 1
fi
tshark -tad -r $1 -z proto,colinfo,ip.id,ip.id -z proto,colinfo,nfs.status,nfs.status -z proto,colinfo,nfs.fh.hash,nfs.fh.hash -z proto,colinfo,nfs.stateid4.other,nfs.stateid4.other -z proto,colinfo,nfs.seqid,nfs.seqid -z proto,colinfo,nfs.pathname.component,nfs.pathname.component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment