Greetings all, I am new to Lua and Wireshark together so apologies for my first post. The situation I have is that we have a server which is pumping out notifications using SOAP/XML protocol. The notification messages are very small in size and coming out at a rate of 10-20 per minute. Initially I wrote a Lua script (after researching for several hours) to extract the data I needed (link below). After executing the script I get output as follows
What I want to next is make the same output appear in a text window within Wireshark GUI. The linked Lua script does not work in a Wireshark Menu wrapper as Field is not available. I would love to hear some pointers or tips on how to proceed. I'm not familiar with writing dissectors if that is the path I need to take.. asked 12 May '15, 12:26 carlwain74 edited 13 May '15, 02:12 grahamb ♦ |
2 Answers:
Hi Carl, You'd need to start your script in the same way you are starting tshark that is with -X option. If I recall correctly Field is not available if you simply paste the code into eval window of wireshark after it was started. Rather than printing you may want to add text to info column ( something along the lines )
Or you may want to use info('') instead of print this will show up in the console ( you may have to reload your pcap after console is opened. Regards Marcin p.s. Nice to see you are still tinkering with lua ;-) good old IPA days answered 14 May '15, 03:13 izopizo edited 14 May '15, 03:17 |
Marcin, Good to hear your still out there working with Wireshark.. It actually worked out that I did not need the Field code to get it to work. The following line was enough to get what I needed. I just needed to offset the XML payload and 50 seemed to work fine and now I can decode all XML payloads.
Now I'm stuck on another issue opening a simple filename. Carl answered 14 May '15, 11:49 carlwain74 |
For some reason not all the XML is being made available. When I finally get to examine the XML content for a different message I am only getting the second half of the XML payload.