Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] running a lua function via tshark

From: "Maayan Zadik" <maayanz@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Jan 2012 18:04:10 +0200

HI,

 

I have a lua script range_check.lua

It has a function range_check(), which checks the ranges of the fields of each packet in a pcap file, and it is registered to the menu “MENU_TOOLS_UNSORTED”

It runs different tests on each packet and saves to a file the Error Log, using a Listener and Field Extractors.

This works great in wireshark.

 

I tried running:

tshark -X lua_script:range_check.lua -q -r my_capture.pcap

but “-X lua_script:range_check.lua” just loads reange_check, it does no run the function “range_check()” on the pcap.

 

Is there a way to run “range_check()“on a given pcap file via tshark?

 

 

 

Regards,

Maayan Zadik

maayanz@xxxxxxxxxxxxxxxxxxxxx