Quick Guide to Network Debugging Assistant (simulating lower computer to send and receive data)

sequence

Because of the requirements of developing a project, the lower computer equipment is needed like a server request to obtain the server response; there is no extra equipment at hand, so the network debugging assistant is used to simulate the lower computer to send and receive messages;

Install

There are many sources on the Internet. It is recommended to use the software NetAssist. Others may be similar. Below are two installation sources;
Baidu Netdisk
website resources

use

insert image description here
This is the main interface of the software. You must first determine your own transmission protocol type. The following will take TCP as an example to explain the use of the software through local testing and simulated remote testing;

local use

It should be noted that the TCP protocol has a server and a client, so two software windows need to be opened;
one selects the server, and the other is of course the client; if you want to test whether there is a problem, you need a unified port (such as 8060 here, this custom ); open the server port, and then connect to the client, then the software will automatically match and establish a connection. If the connection is successfully established, the server window will have Client gets onlinethe words
insert image description here

remote use

In fact, I am still here locally, but I just opened a local service. Take the python backend I want to develop as an example; first, determine the IP address and port number of the server ; other uses are similar
insert image description here

About sending settings

Encoding method (ASCII/HEX)

Since the lower computer uses hexadecimal to send and receive requests, the simulated request information here also needs to be converted into hexadecimal ( HEX ), and you can use the NotePad++ hexadecimal plug-in to convert the string to hexadecimal encoding;
insert image description here
here I want to focus on The emphasis is on the pit in the hexadecimal conversion!

00 disappears during hexadecimal conversion

This is our request header. insert image description here
You can see that there are NULL fields. The meaning of the fields can be viewed in this article .
insert image description here
Here is a problem: If you directly copy and paste the above string, the abbreviations NUL SOH may be lost;
return At this point, when we paste the converted hexadecimal code to the network debugging assistant, we will find that the 00 field is gone. .
insert image description here
It can be seen that 00 has changed to 20, which means that sending and receiving cannot be successful.
insert image description here
Preliminary analysis: 00 in hexadecimal represents an empty string, and the clipboard will automatically kill it. Please refer to the article;
therefore, it is recommended for this kind of simulated sending and receiving data operations. Using the method of directly importing a hex file

import request data file

insert image description here
Open the data source, here you can save the information to be sent directly to the file, so as to avoid accidents in the process of pasting and copying.
The above is just the basic use, if you need to look at other functions later~

Guess you like

Origin blog.csdn.net/weixin_54594861/article/details/123922734