source code for payload display in frame and hex format pls

Apr 12, 2012 at 5:24 AM

I need a source code for payload display in frame and hex format please. A similar format in GUI that allows you to click on the hex and highlights the frames or text data content vice versa.

Apr 12, 2012 at 9:14 PM

Can you maybe give an example for is the input and output that you need?

Apr 12, 2012 at 9:41 PM

Thanks Brickner,

 Take an example Microsoft network monitor 3.4 as the GUI being referenced in my posting it has a Frame details and Hex details panel which allow you to click on the frame details and have the hex details highlighted. Any source code that has displaying packet payload data, and the packet payload in hex format will do please. Thanks

Apr 13, 2012 at 9:52 AM

I don't know Microsoft network monitor 3.4.

I think you can just search for converting bytes to hex string. There are many examples on the web.

Then you can just take the packet payload and convert its bytes to hex.

Apr 13, 2012 at 10:05 AM
Edited Apr 13, 2012 at 10:07 AM

Thanks for the reply. Do you have a any source code for a simple implementation for capturing and displaying full details of packet payload using the pcapdontnet API to C# VS Windows Forms . This can assist a beginner to hit the ground running. I have looked at the examples on both here and search results in google but non seems to have this for a biginner please. No worries if such example is not available. I will hopefully have more time after exams to sit and explore using the PCAP.NET in packet capturing.

Thanks again.

Apr 13, 2012 at 10:14 AM


string PacketToString(Packet packet)
  byte[] packetBytes = packet.ToArray();
  return BitConverter.ToString(packetBytes);


I hope this helps (I didn't check that this compiles, but it should be fine),




Apr 13, 2012 at 10:18 AM

Thanks a lot. I will test it  in my project after my exams and get back sometime in May.