1. Check if the Wireshark version supports LUA
Open Wireshark, click on the "Helpàabout Wireshark" menu to view the popup dialog box, if there is "with LUA 5.1" to support the Lua language extension, if there is "without Lua" indicates that the LUA extension is not supported.
2. Enable Lua
The way to enable LUA in the global configuration file is to remove the Disable_lua line from the Init.lua file. The file can be found by clicking "Helpàabout Wireshark" in the pop-up dialog to find "Foldersàglobal configuration" and get Init.lua location for C:/Program Files/wireshark , open the folder to discover the Init.lua file.
--LUA is disabled by default and comment out of the following line to enable Lua support.
--disable_lua = true; do return end;
--If set and we is running with special privileges this setting
--tells whether scripts other than this one is to be run.
Run_user_scripts_when_superuser = False
Lua is not enabled by default, and the previous add "--" comment out this line to enable LUA.
3. Create a test script
Create a LUA test script for Hello world to check if LUA is enabled.
--Hello.lua
--Lua ' s implementation of D. Ritchie's Hello World program.
Print ("Hello world!")
4. Test the Hello.lua script
You can use the Tshark command to test and go to the Wireshark installation directory to execute the following command.
# CD C:\Program Files\wireshark
# tshark-x Lua_script:hello.lua
C:\Program Files\wireshark>tshark-x Lua_script:hello.lua
Hello world!
Capturing on Intel (R) 82567LM Gigabit Network Connection
Next you can use the Lua language to add a decoder for the Wireshark protocol.
http://blog.csdn.net/fan_hai_ping/article/details/6703468
The LUA language is used in Wireshark (GO)