Skip to content

Instantly share code, notes, and snippets.

@grittyninja
Last active August 19, 2016 07:17
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 grittyninja/5f4f4321860b931a0fcf827d95869af8 to your computer and use it in GitHub Desktop.
Save grittyninja/5f4f4321860b931a0fcf827d95869af8 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "[+] TCP STREAM"
STREAM=0
while true; do
IP=$(tshark -r tmp_einqrztl_10.pcapng -Y "tcp.stream eq $STREAM" -T fields -e ip.dst | sed -e 's/10.0.2.15//g' | sort | uniq | tr -d '\n')
if [ $IP ]; then
echo "[+] Extracting statistics data from Conversation $STREAM"
# CALCULATE HERE
else
echo "[+] END"
break
fi
((++STREAM))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment