On Sun, Jan 15, 2012 at 6:34 AM, Maayan Zadik <[email protected] > wrote:
> ** > > Is there a way to retrieve the capture file name from inside the Lua > script, that way I can name the log: “<filename>_log”?**** > > > Someone asked<http://www.wireshark.org/lists/wireshark-users/201109/msg00095.html> about this a few months ago. No, the Lua API currently does not support this, but there might be other ways to accomplish the same goal: 1) Pass environment variable, containing the filename, to the Lua script echo "print('\$PCAP:', os.getenv('PCAP'))" > foo.lua PCAP=foo.pcap tshark -r foo.pcap -Xlua_script:foo.lua -q 2) Print to stdout from Lua, and redirect to file tshark -r foo.pcap -Xlua_script:foo.lua -q > foo.pcap.analysis.txt
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <[email protected]> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:[email protected]?subject=unsubscribe
