The network data and utf-8 decoded text

gulizhiguhao
2 min readFeb 10, 2022

Today I want to share something about the network data and the utf-8 decoded text. I think we really should know what is going on during our data sent according to some popular protocols when we are hacking.

Intro

The data is sent in the form of bytes instead of string. But when we display those bytes in front of us, we would like to see the string so we can read it easily. It seems like every bytes has a char correspond to it while it's not.

0d 0a is carriage return and line feed, yes
61 is 'a'

But what about ff?

ff does has a corresponding char if you turn it directly with 'new String()' in Java.
But when you turn it back with 'String.getBytes()’, you will find it can not be translated to the ff.

Now we have spot a situation that:
In fact, every char has a corresponding bytes while not every bytes has a corresponding char.
This will trigger some error you might not noticed.

PentestSuite will let this error show even more obviously here.

Video demo

Here I use PentestSuite to demonstrate that situation.

https://youtube.com/shorts/kfjMWqWKaaM?feature=share

If you have anything interested or get confused about this, I am looking forward to your comment❤️

--

--

gulizhiguhao

Android hacking experience pusher — Author of PentestSuite