This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

tshark displaying http headers

0

Hello, I have a capture file and need to display just the source and destination addresses and ports along with the http request and response headers. I have done a lot of searching but haven't found the correct tshark command to accomplish this task. I want to use tshark because the windows ui for wireshark is inaccessible for a blind user.

Any tips would be greatly appreciated

asked 11 Dec '14, 10:03

dnraikes's gravatar image

dnraikes
11223
accept rate: 0%

Are you looking for all the http headers, e.g. Content-Length etc., or do you want just the request URI and the response code?

For accessibility, have you tried the QT version of Wireshark to determine if it suits your needs any better?

(11 Dec '14, 10:43) grahamb ♦

I am looking for all headers. I am using this to help in preparing scripts for fuzzing a web application so I need to see all the headers.

I haven't tried the qt version of wireshark yet, but I will take a look at it.

(11 Dec '14, 16:20) dnraikes

One Answer:

0

I don't think getting all the headers is very easy. There is no filter field that contains all the headers, instead each header is given it's own filter. Users can also define custom headers each with their own filter field.

As it stands the best option may be to use the pdml output of tshark and post-process that, e.g. using the -T pdml option.

You might also consider raising an enhancement request on the Wireshark Bugzilla to add all http headers to a single filter field, e.g. http.headers so that could then be output using the -e option, but this might be difficult as headers are CRLF separated and that would be awkward for tshark output. Maybe they could be delimited by some other character.

answered 12 Dec '14, 01:40

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Hi, so I tried the QT version of wireshark and it is not accessible either (on windows) on Linux it is fine.

I have decided that what I really need at the moment is the request uri / http version and the response status. This is just an initial test of a fuzzing run.

(10 Jul '15, 10:00) dnraikes