Lua programming

Lua is a programming language that was developed specifically for expanding applications and to be used in embedded systems. So, many applications support Lua as their plugin programming language of choice. Wireshark is no exception to this.

To learn more about Lua, you can go to https://www.lua.org/. You can also go through the various books on Lua programming published by Packt.

You can also go on the Lua website and refer to their documentation section, where you'll find a link https://www.lua.org/pil/ that covers Programming in Lua:

You can see a free book that's available for you to learn programming in Lua. Additionally, you can take a look at the Lua reference manual at https://www.lua.org/manual/5.1/:

It gives you even more detail as to how Lua works, how the programming language is created, and all the details of how it actually functions, if you need more information than just a standard programming how-to manual.

Once you have downloaded a Lua plugin or you have created your own, you can run it in Wireshark as follows:

You can then go to where Wireshark is from the command-line and if we run Wireshark.exe and you look at the help, you will get the following:

You'll see that there is a -X <key>:<value>. This is your eXtension option, also known as dissectors and plugins.

Now, let's run a Lua script by doing the following:

Wireshark.exe -X lua_script:pluginsscript.lua

So here we are saying: Run an extension in Wireshark. It'll be a Lua script, and it has the filename script.lua. Now, it will look wherever you happen to be running the executable, which in this example is under Program FilesWireshark, so you'll want to put your script into the root directory there or in a plugins folder. You could do pluginsscript.lua or whatever the name is of your dissector is. Once you do that and push Enter, it will run Wireshark and try to load that file.

We will now get into our troubleshooting scenario. We'll determine where to capture our traffic in order to best analyze the data and resolve the issue as quickly as possible.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.128.129