The LUA language is used in Wireshark (GO)

Source: Internet
Author: User
Tags lua

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.