can anybody paste a sample c++ or c code to decode the data captured from wireshark ?? asked 26 May '11, 23:42 sagu072 retagged 27 May '11, 20:43 helloworld |
3 Answers:
the source-code for wireshark or tshark is freely available sample code that does exactly what you want. answered 27 May '11, 00:21 martyvis edited 27 May '11, 00:21 |
This is the tutorial I used to learn libpcap capture, parse. Save Wireshark data as pcap and parse it with this code. http://yuba.stanford.edu/~casado/pcap/section1.html answered 27 May '11, 00:23 jakan edited 27 May '11, 00:23 |
There are several resources that show you how to write your own Wireshark dissector. The difficulty level depends on the chosen language. I prefer Lua because it's easier to work with (other than debugging for which I rely on print-outs to the console), Lua doesn't require installing a bunch of packages to setup a build environment; Lua just needs a Wireshark installation. Writing a dissector in C:
Writing a dissector in Lua: answered 27 May '11, 20:42 helloworld edited 27 May '11, 20:45 |