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

I'm new to writing Lua scripts in Wireshark, so maybe my question is stupid, but is it possible to write a Lua script that will export all audio/mpeg packets from a capture? I can do this manually in Wireshark by applying a display filter (http.content_type == "audio/mpeg"), then right-clicking each Media Type in the Packet Details window, and then selecting 'Export selected packet bytes'.

asked 02 Aug '11, 05:41

Jesper's gravatar image

Jesper
1111
accept rate: 0%

edited 02 Aug '11, 17:19

helloworld's gravatar image

helloworld
3.1k42041


Yes, it's possible. See another post where Lua was used to extract the XML payload from TCP into a file. In your case, your tap would be defined as:

Listener.new(nil, 'http.content_type == "audio/mpeg"')

If your capture contains multiple audio/mpeg streams, you'd also have to modify that Lua to separate the streams into their own files (assuming that's detectable from your protocol).

permanent link

answered 02 Aug '11, 17:14

helloworld's gravatar image

helloworld
3.1k42041
accept rate: 28%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×431
×76
×40
×16

question asked: 02 Aug '11, 05:41

question was seen: 5,881 times

last updated: 02 Aug '11, 17:19

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