Wireshark-dev: [Wireshark-dev] Getting a pcap filename from a Lua script
From: "Maayan Zadik" <maayanz@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Jan 2012 13:34:37 +0200

 

Hi,

 

I have several Lua scripts that display different analyses on a displayed capture file (*.pcap extension).

That is, the capture is opened from outside the script, and only after that can the scripts be run.

 

I want to save these analyses to a log file. Current I save the log file under the name “log_<timestamp>”, where <timestamp> is the time I created the log.

But the timestamp still makes it hard to know for which pcap the log was created, if I run the analyses for several files sequentially.

 

Is there a way to retrieve the capture file name from inside the Lua script, that way I can name the log: “<filename>_log”?

This will make is easier to link between the log and the pcap it was created for.

 

 

Regards,

Maayan Zadik

maayanz@xxxxxxxxxxxxxxxxxxxxx