This is our old Q&A Site. Please post any new questions and answers at

hello all i must use some features of all log-data of a adsl router traffic with various users (features like max-min-median length packet in forward or backward flow). after saving traffic with wireshark in pcap or pcapng format, how can i calculate or use this features from a pcap file and use them in a python program??

asked 14 Oct '17, 12:24

MohammadE's gravatar image

accept rate: 0%

If you have file1.pcap to process, you can use tshark -T fields -e frame.len -Eseparator=/t -r file1.pcap > to get the length of each frame in a tab-delimited format for processing via stats library in python or other languages.

the -e option can take any wireshark display filter so you can add additional info if needed (e.g. ip src/dst, tcp src/dst, frame number)

If you want to do all of the processing within python, look into pylibpcap or other pcap-related libraries.

permanent link

answered 18 Oct '17, 07:47

CMH_Tim's gravatar image

accept rate: 0%

edited 18 Oct '17, 07:50

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 14 Oct '17, 12:24

question was seen: 3,247 times

last updated: 18 Oct '17, 07:50

p​o​w​e​r​e​d by O​S​Q​A