I want to create a custom plugin which gets displayed on the tool bar in wireshark GUI. When the user clicks on the new custom option, then the custom lua script should be executed.
How can I achieve this?
I want to create a custom plugin which gets displayed on the tool bar in wireshark GUI. When the user clicks on the new custom option, then the custom lua script should be executed.
How can I achieve this?
Simply go through the following steps:
In your plugin Lua file (which you should make sure Wireshark loads), start by adding a function which does the job you want your plugin to do:
local function runPlugin()
--here your plugin does its job
end
Then you register the runPlugin()
function to be launched from the wireshark toolbar:
register_menu("Lua/Launch my plugin", launhing_function, MENU_TOOLS_UNSORTED);
Now when you open Wireshark and click on Tools > Lua > Launch my plugin the runPlugin()
function is called.
Hope this helps!