Is tshark able to print only the content of a http response? With "content of a http response" I mean that part, that is normally displayed by the web browser. When I use the command
the response can occur in several different places:
I created a demo for each of these cases at http://pastebin.com/uEWuHagu In the first case I would like to get that part of "Reassembled TCP" that follows <!DOCTYPE html. In the second case I would like to get everything that follows the line "De-chunked entity body (10 bytes):" In the third case I would like to get everything that follows the line "Uncompressed entity body (462 bytes):" In the fourth case I would like to get everything that belongs to the ascii image and everything that follows that image. I am not sure if another situation is possible. I would like to get the described response in any situation. It would be fantastic if that is possible. asked 27 Jan '15, 17:57 miachino edited 28 Jan '15, 05:39 |
One Answer:
You can get the de-chunked entity body one by printing the "
For the others, I don't know of a way to get them with tshark alone, but you can use a Lua script to get them. For example the script provided in this link's answer, with the following tshark command:
I can explain how to modify that script to get the answered 28 Jan '15, 20:35 Hadriel |
@Hadriel Thanx for your answer. Unfortunately I have no idea about Lua. Therefore I am not even able to read your script that you wrote as a reply to the other question. Because of that I am at least sceptical that I would understand your explanations. But of course it would be very kind of you if we could give it a try.