A data packet playback method and device, computer equipment and storage medium
By calling the tcpdump tool and simulation server for user authentication, and modifying existing tools to support multi-protocol data packet playback, the problem that traditional simulation servers cannot meet the needs of complex application scenarios is solved, and the function of receiving multicast messages after user authentication is realized.
Patent Information
- Application Number
- CN202311699209.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-12-12
AI Technical Summary
Traditional simulation servers cannot play back single messages, which is insufficient for the complex application scenarios in the securities industry where brokerage servers send multicast information to paying users, especially when user authentication is required.
The tcpdump packet capture tool is used to obtain TCP data packets and multicast packets between the client and the server. User authentication is performed, and after successful authentication, the user is added to the multicast group and multicast packets are sent. The existing tool is modified to support multi-protocol data packet playback.
After user authentication is implemented, the client can join the server multicast group and receive multicast messages, which solves the problem that traditional playback tools cannot meet the needs of complex application scenarios and supports multi-protocol data packet playback.
Smart Images

Figure CN117879979B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data communication technology in artificial intelligence, and in particular to a data packet playback method, apparatus, computer equipment, and storage medium. Background Technology
[0002] In the development of C / S (server / client) communication systems, it is often necessary to replay network data packets using certain methods.
[0003] Typically, commonly used software such as TcpReplay and Tcpdump replay data packets either replay a single TCP packet, a single UDP packet, or a single multicast packet.
[0004] However, traditional simulation servers that can only replay single messages can no longer meet the complex application scenarios of real-world users. For example, when a server needs to multicast to authenticated users, these simulation server replay tools cannot meet user needs. This is especially true in the securities industry, where brokerage servers send multicast information to their paying users only if the user is authenticated as a paying user of the brokerage. If so, the user will receive the real-time multicast information sent by the brokerage server; otherwise, they will not receive it. Summary of the Invention
[0005] The purpose of this application is to provide a data packet playback method, apparatus, computer device, and storage medium to solve the problem that traditional simulation servers can no longer play back single messages to meet the complex application scenarios of real users.
[0006] To address the aforementioned technical problems, this application provides a data packet replay method, employing the following technical solution:
[0007] Use the tcpdump packet capture tool to obtain TCP data packets and multicast packets used in communication between the client and the server.
[0008] Invoke the simulation server and replay the TCP data packets according to the simulation server;
[0009] Upon receiving a client message sent by the current client in response to the replayed TCP data packet, a user authentication operation is performed on the client message to obtain the authentication result;
[0010] If the authentication result is unsuccessful, a re-authentication signal is sent to the current client, and the client message sent by the current client is received again.
[0011] If the authentication result is successful, the current client will be included in the multicast group;
[0012] Send the multicast message to the clients within the multicast group.
[0013] Furthermore, the step of calling the tcpdump packet capture tool to obtain the TCP data packets of communication between the client and the server specifically includes the following steps:
[0014] The TCP data packets are captured in segments using the tcpdump packet capture tool.
[0015] Furthermore, the client message includes user identification information and user password information. The step of performing user authentication on the client message after receiving the client message sent by the current client in response to the replayed TCP data packet, and obtaining the authentication result, specifically includes the following steps:
[0016] The system retrieves the user information database and checks whether the user identification information and the user password information from the client message exist in the database.
[0017] If the user identifier information and the user password information exist in the user information database, then the authentication result is confirmed as passed;
[0018] If the user identifier information and the user password information are not found in the user information database, then the authentication result is confirmed as unsuccessful.
[0019] Furthermore, after the step of calling the tcpdump packet capture tool to obtain the TCP data packets and multicast packets of communication between the client and the server, and before the step of calling the simulation server and replaying the TCP data packets according to the simulation server, the following steps are also included:
[0020] The authentication information, including username, password, and multicast IP, is added to the TCP data packet to obtain the processed data packet.
[0021] The step of calling the simulation server and replaying the TCP data packets according to the simulation server specifically includes the following steps:
[0022] The simulation server is invoked, and the processed data message is replayed according to the simulation server.
[0023] Furthermore, the step of invoking the simulation server and replaying the TCP data packets according to the simulation server specifically includes the following steps:
[0024] Retrieve the customized TCP header;
[0025] Remove the TCP header from the TCP data packet and add the customized TCP header to the TCP data packet with the TCP header removed to obtain the modified data packet;
[0026] The simulation server replays the modified data message.
[0027] To address the aforementioned technical problems, this application also provides a data packet playback device, which employs the following technical solution:
[0028] The collection module is used to call the tcpdump packet capture tool to obtain TCP data packets and multicast packets used in communication between the client and the server.
[0029] The playback module is used to call the simulation server and replay the TCP data packets according to the simulation server.
[0030] The authentication module is used to perform user authentication on the client message sent by the current client in response to the replayed TCP data packet, and obtain the authentication result.
[0031] The authentication failure module is used to send a re-authentication signal to the current client and re-receive client messages sent by the current client if the authentication result is unsuccessful.
[0032] The authentication module is used to include the current client in the multicast group if the authentication result is successful.
[0033] The sending module is used to send the multicast message to the clients within the multicast group.
[0034] Furthermore, the collection module includes:
[0035] The packet collection submodule is used to capture TCP data packets in segments according to the tcpdump packet capture tool.
[0036] Furthermore, the client message includes user identification information and user password information, and the authentication module includes:
[0037] The authentication submodule is used to call the user information database and check whether the user identification information and the user password information in the client message exist in the user information database.
[0038] The authentication pass submodule is used to confirm that the authentication result is passed if the user identifier information and the user password information exist in the user information database;
[0039] The authentication failure submodule is used to confirm that the authentication result is unsuccessful if the user identifier information and the user password information do not exist in the user information database.
[0040] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:
[0041] It includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the data packet playback method as described above.
[0042] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:
[0043] The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the data packet playback method described above.
[0044] This application provides a data packet replay method, including: calling the tcpdump packet capture tool to obtain TCP data packets and multicast packets communicating between the client and the server; calling a simulation server and replaying the TCP data packets according to the simulation server; upon receiving a client packet sent by the current client in response to the replayed TCP data packets, performing user authentication on the client packet to obtain an authentication result; if the authentication result is unsuccessful, sending a re-authentication signal to the current client and re-receiving the client packet sent by the current client; if the authentication result is successful, adding the current client to the multicast group; and sending the multicast packet to clients within the multicast group. Compared with existing technologies, this application modifies and optimizes data packet replay tools such as TcpReplay and Tcpdump. Specifically, it adds TCP authentication. Only after successful authentication can the client join the server's multicast group address range and receive multicast packets sent by the server, thereby effectively solving the problem that traditional simulation servers can no longer play back single packets to meet the complex application scenarios of real users. Attached Figure Description
[0045] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1This is an exemplary system architecture diagram to which this application can be applied;
[0047] Figure 2 This is a flowchart illustrating the implementation of the data packet playback method provided in Embodiment 1 of this application;
[0048] Figure 3 This is a schematic diagram of the data packet playback device provided in Embodiment 2 of this application;
[0049] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0051] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0052] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0053] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0054] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0055] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0056] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.
[0057] It should be noted that the data packet playback method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the data packet playback device is generally set in the server / terminal device.
[0058] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0059] Continue to refer to Figure 2 The diagram shows a flowchart of an embodiment of the data packet playback method according to this application. The data packet playback method includes steps S201, S202, S203, S204, S205, S206, and S207.
[0060] In step S201, the tcpdump packet capture tool is called to obtain the TCP data packets and multicast packets used for communication between the client and the server.
[0061] In this embodiment of the application, tcpdump is used to capture all data packets used in the communication between the client and the server.
[0062] In this embodiment of the application, the data packets captured by tcpdump are parsed by analyzing the TCP data packets and the given protocol (such as multicast packets), and the response messages required by the playback server are generated.
[0063] In step S202, the simulation server is invoked, and the TCP data packets are replayed according to the simulation server.
[0064] In step S203, after receiving the client message sent by the current client for the replayed TCP data packet, a user authentication operation is performed on the client message to obtain the authentication result.
[0065] In this embodiment of the application, the playback server is started, and according to the configuration, the data packets captured by tcpdump and the TCP report packets are loaded, the client is authenticated, and the corresponding multicast address is pushed to the client.
[0066] In step S204, if the authentication result is unsuccessful, a re-authentication signal is sent to the current client, and the client message sent by the current client is received again.
[0067] In this embodiment, when TCP packet replay begins, user authentication is performed first, and the authentication process can involve multiple interactions. If user authentication fails, the client is removed from the multicast group; for example, authentication includes a username ID and password (or verification code).
[0068] In step S205, if the authentication result is successful, the current client is included in the multicast group.
[0069] In this embodiment, after user authentication is successful, the replay of business data packets begins. Multi-protocol data packet replay is supported: different TCP data packets can have their TCP headers removed, and then custom TCP headers added to the TCP payload data before being replayed.
[0070] In step S206, a multicast message is sent to the client in the multicast group.
[0071] In this embodiment of the application, after the authenticated user joins the multicast group, he / she begins to receive multicast messages from the replay server multicast group.
[0072] This application provides a data packet replay method, including: calling the tcpdump packet capture tool to obtain TCP data packets and multicast packets communicating between the client and the server; calling a simulation server and replaying the TCP data packets according to the simulation server; upon receiving a client packet sent by the current client in response to the replayed TCP data packets, performing user authentication on the client packet to obtain the authentication result; if the authentication result is unsuccessful, sending a re-authentication signal to the current client and re-receiving the client packet sent by the current client; if the authentication result is successful, adding the current client to the multicast group; and sending multicast packets to clients within the multicast group. Compared with the prior art, this application modifies and optimizes data packet replay tools such as TcpReplay and Tcpdump. Specifically, it adds TCP authentication. Only after successful authentication can the client join the server's multicast group address range and receive multicast packets sent by the server, thereby effectively solving the problem that the traditional simulation server's replay of single packets can no longer meet the complex application scenarios of real users.
[0073] In some optional implementations of this embodiment, step S201 includes the following steps:
[0074] The TCP data packets are captured in segments using the tcpdump packet capture tool.
[0075] In this embodiment of the application, the purpose of packet capture is to prevent a single data packet from being too large.
[0076] In some optional implementations of this embodiment, the client message includes user identification information and user password information, and step S203 includes the following steps:
[0077] The system calls the user information database and checks whether the user identification information and user password information from the client message exist in the database.
[0078] If the user identification information and user password information exist in the user information database, the authentication result is confirmed as successful.
[0079] If the user identification information and user password information are not found in the user information database, the authentication result is confirmed as unsuccessful.
[0080] In some optional implementations of this embodiment, after step S201 and before step 202, the following steps are further included:
[0081] The authentication information, including username, password, and multicast IP, is added to the TCP datagram to obtain the processed datagram.
[0082] Step S202 includes the following steps:
[0083] Call the simulation server and replay the processed data messages based on the simulation server.
[0084] In this embodiment, the TCP data packets in the playback packet contain user authentication information; this authentication information is configurable.
[0085] In some optional implementations of this embodiment, step S206 specifically includes the following steps:
[0086] Retrieve the customized TCP header;
[0087] Remove the TCP header from the TCP datagram and add a custom TCP header to the TCP datagram with the TCP header removed to obtain the modified datagram;
[0088] The simulation server replays the modified data packets.
[0089] In this embodiment of the application, conditional, serial replay of multi-protocol data packets (TCP packets, multicast packets, etc.) is supported; after the above authentication is successful, the client can receive multicast packets sent by the server.
[0090] In this embodiment of the application, the multicast received by the client can be customized and configurable.
[0091] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0092] Artificial intelligence (AI) fundamental technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by instructing related hardware with computer-readable instructions, which can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0093] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0094] Example 2
[0095] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a data packet playback device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0096] like Figure 3 As shown, the data packet playback device 200 of this embodiment includes: a collection module 210, a playback module 220, an authentication module 230, an authentication failure module 240, an authentication success module 250, and a sending module 260. Wherein:
[0097] The collection module 210 is used to call the tcpdump packet capture tool to obtain TCP data packets and multicast packets between the client and the server.
[0098] The playback module 220 is used to call the simulation server and replay the TCP data packets according to the simulation server.
[0099] The authentication module 230 is used to perform user authentication on the client message after receiving the client message sent by the current client for the replayed TCP data packet, and obtain the authentication result.
[0100] The authentication failure module 240 is used to send a re-authentication signal to the current client and re-receive client messages sent by the current client if the authentication result is unsuccessful.
[0101] The authentication module 250 is used to include the current client in the multicast group if the authentication result is successful.
[0102] The sending module 260 is used to send multicast messages to clients within the multicast group.
[0103] In this embodiment of the application, tcpdump is used to capture all data packets used in the communication between the client and the server.
[0104] In this embodiment of the application, the data packets captured by tcpdump are parsed by analyzing the TCP data packets and the given protocol (such as multicast packets), and the response messages required by the playback server are generated.
[0105] In this embodiment of the application, the playback server is started, and according to the configuration, the data packets captured by tcpdump and the TCP report packets are loaded, the client is authenticated, and the corresponding multicast address is pushed to the client.
[0106] In this embodiment, when TCP packet replay begins, user authentication is performed first, and the authentication process can involve multiple interactions. If user authentication fails, the client is removed from the multicast group; for example, authentication includes a username ID and password (or verification code).
[0107] In this embodiment, after user authentication is successful, the replay of business data packets begins. Multi-protocol data packet replay is supported: different TCP data packets can have their TCP headers removed, and then custom TCP headers added to the TCP payload data before being replayed.
[0108] In this embodiment of the application, after the authenticated user joins the multicast group, he / she begins to receive multicast messages from the replay server multicast group.
[0109] In this embodiment of the application, a data packet replay device 200 is provided, including: a collection module 210, used to call the tcpdump packet capture tool to obtain TCP data packets and multicast packets of communication between the client and the server; a replay module 220, used to call a simulation server and replay the TCP data packets according to the simulation server; an authentication module 230, used to perform user authentication operation on the client packet after receiving the client packet sent by the current client in response to the replayed TCP data packets, and obtain the authentication result; an authentication failure module 240, used to send a re-authentication signal to the current client and re-receive the client packet sent by the current client if the authentication result is failure; an authentication success module 250, used to include the current client in the multicast group if the authentication result is success; and a sending module 260, used to send multicast packets to clients in the multicast group. Compared with existing technologies, this application modifies and optimizes packet replay tools such as TcpReplay and Tcpdump. Specifically, TCP authentication is added. Only after successful authentication can the client join the server's multicast group address range and receive multicast messages sent by the server. This effectively solves the problem that traditional simulation servers can no longer play back single messages to meet the complex application scenarios of real users.
[0110] In some optional implementations of this embodiment, the collection module 210 includes: a packet collection submodule, wherein:
[0111] The packet collection submodule is used to capture TCP data packets in segments using the tcpdump packet capture tool.
[0112] In some optional implementations of this embodiment, the client message includes user identification information and user password information, and the authentication module 230 includes:
[0113] The authentication submodule is used to call the user information database and check whether the user identification information and user password information in the client message exist in the user information database.
[0114] The authentication passed submodule is used to confirm that the authentication result is passed if the user identification information and user password information exist in the user information database;
[0115] The authentication failure submodule is used to confirm that the authentication result is unsuccessful if the user identifier and password information are not found in the user information database.
[0116] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0117] The computer device 300 includes a memory 310, a processor 320, and a network interface 330 that are interconnected via a system bus. It should be noted that only the computer device 300 with components 310-330 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0118] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0119] The memory 310 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 310 may be an internal storage unit of the computer device 300, such as the hard disk or memory of the computer device 300. In other embodiments, the memory 310 may also be an external storage device of the computer device 300, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the computer device 300. Of course, the memory 310 may also include both internal storage units and external storage devices of the computer device 300. In this embodiment, the memory 310 is typically used to store the operating system and various application software installed on the computer device 300, such as computer-readable instructions for data packet playback methods. Furthermore, the memory 310 can also be used to temporarily store various types of data that have been output or will be output.
[0120] In some embodiments, the processor 320 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 320 is typically used to control the overall operation of the computer device 300. In this embodiment, the processor 320 is used to execute computer-readable instructions stored in the memory 310 or to process data, for example, to execute computer-readable instructions for the data packet playback method.
[0121] The network interface 330 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 300 and other electronic devices.
[0122] The computer equipment provided in this application modifies and optimizes packet playback tools such as TcpReplay and Tcpdump. Specifically, TCP authentication is added. Only after successful authentication can the client join the server's multicast group address range and receive multicast messages sent by the server. This effectively solves the problem that traditional simulation servers can no longer play back single messages to meet the complex application scenarios of real users.
[0123] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the data packet playback method described above.
[0124] The computer-readable storage medium provided in this application modifies and optimizes packet replay tools such as TcpReplay and Tcpdump. Specifically, it adds TCP authentication. Only after successful authentication can the client join the server's multicast group address range and receive multicast messages sent by the server. This effectively solves the problem that traditional simulation servers can no longer play back single packets, which is insufficient for complex application scenarios in real-world applications.
[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0126] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A data packet playback method, characterized in that, Includes the following steps: Use the tcpdump packet capture tool to obtain TCP data packets and multicast packets used in communication between the client and the server. Invoke the simulation server and replay the TCP data packets according to the simulation server; Upon receiving a client message sent by the current client in response to the replayed TCP data packet, a user authentication operation is performed on the client message to obtain the authentication result; If the authentication result is unsuccessful, a re-authentication signal is sent to the current client, and the client message sent by the current client is received again. If the authentication result is successful, the current client will be included in the multicast group; Send the multicast message to the clients within the multicast group; The client message includes user identification information and user password information. The step of performing user authentication on the client message after receiving the client message sent by the current client in response to the replayed TCP data packet, and obtaining the authentication result, specifically includes the following steps: The system retrieves the user information database and checks whether the user identification information and the user password information from the client message exist in the database. If the user identifier information and the user password information exist in the user information database, then the authentication result is confirmed as passed; If the user identifier information and the user password information do not exist in the user information database, then the authentication result is confirmed as unsuccessful. After the step of calling the tcpdump packet capture tool to obtain the TCP data packets and multicast packets of communication between the client and the server, and before the step of calling the simulation server and replaying the TCP data packets according to the simulation server, the following steps are also included: The authentication information, including username, password, and multicast IP, is added to the TCP data packet to obtain the processed data packet. The step of calling the simulation server and replaying the TCP data packets according to the simulation server specifically includes the following steps: The simulation server is invoked, and the processed data message is replayed according to the simulation server.
2. The data packet playback method according to claim 1, characterized in that, The steps of calling the tcpdump packet capture tool to obtain TCP data packets for communication between the client and the server specifically include the following steps: The TCP data packets are captured in segments using the tcpdump packet capture tool.
3. The data packet playback method according to claim 1, characterized in that, The step of calling the simulation server and replaying the TCP data packets according to the simulation server specifically includes the following steps: Retrieve the customized TCP header; Remove the TCP header from the TCP data packet and add the customized TCP header to the TCP data packet with the TCP header removed to obtain the modified data packet; The simulation server replays the modified data message.
4. A data packet playback device, characterized in that, include: The collection module is used to call the tcpdump packet capture tool to obtain TCP data packets and multicast packets used in communication between the client and the server. The playback module is used to call the simulation server and replay the TCP data packets according to the simulation server. The authentication module is used to perform user authentication on the client message sent by the current client in response to the replayed TCP data packet, and obtain the authentication result. The authentication failure module is used to send a re-authentication signal to the current client and re-receive client messages sent by the current client if the authentication result is unsuccessful. The authentication module is used to include the current client in the multicast group if the authentication result is successful. The sending module is used to send the multicast message to the clients within the multicast group; The client message includes user identification information and user password information, and the authentication module includes: The authentication submodule is used to call the user information database and check whether the user identification information and the user password information in the client message exist in the user information database. The authentication pass submodule is used to confirm that the authentication result is passed if the user identifier information and the user password information exist in the user information database; The authentication failure submodule is used to confirm that the authentication result is unsuccessful if the user identifier information and the user password information do not exist in the user information database. The authentication module is also used to add authentication information (username, password, and multicast IP) to the TCP data packet to obtain the processed data packet. The playback module is also used to call the simulation server and play back the processed data message according to the simulation server.
5. The data packet playback device according to claim 4, characterized in that, The collection module includes: The packet collection submodule is used to capture TCP data packets in segments according to the tcpdump packet capture tool.
6. A computer device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the data packet playback method as described in any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the data packet playback method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Multicast authentication method, authentication equipment and multicast authentication server
CN101304328A
Method, system and device of message authentication
CN103259768A