Convert Byte Array in Readable Text

Apr 2, 2012 at 6:22 PM


How to convert the contents of a package that is in bytes for a readable text ?



Apr 2, 2012 at 7:56 PM

Hi Leolosi,


This is quite a generic question.

It really depends what bytes you have and what do you consider readable text.

If you have bytes that contains ascii characters you can use Encoding.ASCII.GetString().

You can also use other encodings.

You can also convert each byte to 2 hex characters to build a string.


This is really unrelated to Pcap.Net and I believe you can find many examples on the web.


I hope this helps,