W3-2/3 Lua (7/10)


   On Tuesday I decided to study up on Lua. I thought that it might help me gain a greater understanding of Wireshark or at least using its filters. I was still playing with Wireshark but this time around I was mostly just worried about writing filter commands. Lua is quite a nifty little programming language as its syntax is very minimalist and is flexible enough to be written in a variety of styles. I found out the Lua can be used to write dissectors (protocol parser), post-dissectors (used to add items to a dissection tree after all the dissectors have finished), and taps (a script meant to catch data from frames). Though in general it is preferable to use C to write dissectors because it is faster due to better available debugging tools, however one might find some use in prototyping dissectors in Lua.
    
       I would play around with mixing aliases and standard values. I was basically trying to see how many different ways I could write effectively the same filter without changing the logic of the filter (“HTTP” or “tcp.port == 80” not “tcp.port >79 and tcp.port <81”). I wanted to look for “lingual synonyms” not “structural synonyms”. In the end it wasn’t very exciting, but it let me play with the flexibility of the language.
   
     I was also curious how valuable experience with Lua was and where is it best to be applied. In general, the industry is not really clamoring for Lua scribes. It’s certainly not a bad skill to have but there are plenty of better skills to master and languages to learn. Despite Lua’s flexibility it has very limited use in the industry. The only specific thing that I could find it used for was game engines, which is neat but quite a niche field.  It is also great to embed in a C language or to use with a C compiler but past that it’s just not powerful enough. The language is easy to read, requires minimal syntax, and is supposed to have quick run time speed but those are merely just luxuries. It is usually outclassed by Python which is also very flexible and a lot more powerful. Lua can do a lot of things, but it can’t do a lot of things the best.
  
     I feel like this was time well spent. Since I can traverse Wireshark’s filters a little bit better and I now have a slightly better understanding of Wireshark. I may practice with Lua some more on my own time because I like using C++ but I’m not super motivated to do so. I know if I’m ever trying to embed onto a C language or if I was trying to work with a C compiler then Lua would be my top candidate to use. I’m feeling more comfortable with Wireshark, but I still need more experience this is a great start though. Thus far I really like that I am learning more and more as time goes on.

Comments

Popular posts from this blog

W7-2/3 On Being Prepared & Further Recommendations (8/11)

W2-2/3 Network Mapping (7/5)

W1-2/3 Prioritization (6/27)