CN114070752B - Test method, test device, electronic equipment and computer readable storage medium - Google Patents
Test method, test device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN114070752B CN114070752B CN202111365218.3A CN202111365218A CN114070752B CN 114070752 B CN114070752 B CN 114070752B CN 202111365218 A CN202111365218 A CN 202111365218A CN 114070752 B CN114070752 B CN 114070752B
- Authority
- CN
- China
- Prior art keywords
- data packet
- target node
- original data
- test result
- mutation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 133
- 238000010998 test method Methods 0.000 title claims description 20
- 238000000034 method Methods 0.000 claims abstract description 46
- 230000008569 process Effects 0.000 claims abstract description 21
- 230000035772 mutation Effects 0.000 claims description 57
- 238000012545 processing Methods 0.000 claims description 40
- 230000004044 response Effects 0.000 claims description 34
- 230000002159 abnormal effect Effects 0.000 claims description 29
- 230000006855 networking Effects 0.000 claims description 5
- 230000009225 memory damage Effects 0.000 claims description 3
- 230000005856 abnormality Effects 0.000 abstract description 16
- 238000012544 monitoring process Methods 0.000 abstract description 16
- 238000004590 computer program Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/04—Processing captured monitoring data, e.g. for logfile generation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0876—Aspects of the degree of configuration automation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Environmental & Geological Engineering (AREA)
- Automation & Control Theory (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The disclosure provides a testing method, a testing device, electronic equipment and a computer readable storage medium, and relates to the technical field of computers, in particular to the technical field of automatic testing. The specific implementation scheme is as follows: the variant data packet is sent to a target node, so that the target node processes the variant data packet; the test result is determined by sending a topology query message to the target node. In the scheme, the operating state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operating state of the target node, effective monitoring on abnormality in the test is realized, and the normal implementation of the automatic test is ensured.
Description
Technical Field
The disclosure relates to the field of computer technology, in particular to the field of automated testing technology, and specifically relates to a testing method, a testing device, electronic equipment and a computer readable storage medium.
Background
When an automatic test is performed, an abnormality generated in a test process needs to be monitored, in the prior art, an operation state of a device to be tested is generally detected by a serial port detection method or a method of sending an internet packet explorer (Packet Internet Groper, ping) packet to the device to be tested, so that the abnormality monitoring is realized.
However, in some situations, the test task is not executed by the device under test, which results in that the abnormal monitoring in the test process cannot be performed by the conventional serial port detection or the manner of sending the ping packet to the device under test, and thus the automatic test cannot be normally implemented.
Disclosure of Invention
In order to solve at least one of the defects, the disclosure provides a test method, a test device, an electronic device and a computer readable storage medium.
According to a first aspect of the present disclosure, there is provided a test method comprising:
the variant data packet is sent to a target node, so that the target node processes the variant data packet;
the test result is determined by sending a topology query message to the target node.
According to a second aspect of the present disclosure, there is provided a test apparatus comprising:
the variable data sending module is used for sending the variable data packet to the target node so that the target node processes the variable data packet;
and the test result determining module is used for determining a test result by sending a topology query message to the target node.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the test method.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the above-described test method.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above-described test method.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a test method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a test system provided in an embodiment of the present disclosure;
FIG. 3 is a flow chart of another test method provided by an embodiment of the present disclosure;
FIG. 4 is a schematic structural view of a test device provided in accordance with the present disclosure;
FIG. 5 is a schematic structural view of another test device provided in accordance with the present disclosure;
fig. 6 is a block diagram of an electronic device for implementing a test method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Easy Mesh (Easy Mesh) is a networking authentication standard for multiple wireless devices introduced by the wireless fidelity (WirelessFidelity, wiFi) alliance, and multiple wireless access points supporting this standard can be configured into a multi-node and wide coverage wireless local area network.
Since Easy Mesh is an emerging technology, no vulnerability discovery tool and method for Easy Mesh exists at present.
The data packets in the Easy Mesh network control stage are generally processed by one network node in the Mesh network, but the network node in the Mesh network may not be a specific device, and one device may also include a plurality of network nodes, so when an automatic test is performed, the running state of the network node cannot be detected by a traditional serial port detection or a manner of sending a packet of an internet packet explorer (Packet Internet Groper, ping) packet, and abnormal monitoring during the test cannot be realized, so that the automatic test cannot be normally realized.
The embodiment of the application provides a testing method, a testing device, electronic equipment and a computer readable storage medium, which aim to solve at least one of the technical problems in the prior art.
Fig. 1 shows a flow chart of a testing method provided by an embodiment of the disclosure, and as shown in fig. 1, the method may mainly include:
step S110: the variant data packet is sent to a target node, so that the target node processes the variant data packet;
step S120: the test result is determined by sending a topology query message to the target node.
The mutation data packet is a data packet used for the fuzzy test after the mutation processing, for example, may be a data packet in the Easy Mesh network control stage after the mutation processing.
The target node is used for processing the variant data packet after receiving the variant data packet, and the target node may not be a specific device, but may be a logic entity, which may be disposed on a device separately, or may be disposed on a device together with other target nodes. As one example, the target node may be a network node in a Mesh networking.
The topology query message is used for querying topology information of the target node.
In the embodiment of the disclosure, the operation state of the target node can be determined by sending the topology query message to the target node, and the operation state of the target node can reflect the test result.
According to the method provided by the implementation of the disclosure, the variant data packet is sent to the target node, so that the target node processes the variant data packet, and the test result is determined by sending the topology query message to the target node. In the scheme, the operating state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operating state of the target node, effective monitoring on abnormality in the test is realized, and the normal implementation of the automatic test is ensured.
In an alternative manner of the present disclosure, determining a test result by sending a topology query message to a target node includes:
sending a topology query message to a target node;
if topology response information returned by the target node based on the topology query message is received, determining that the test result is normal;
if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
In the embodiment of the disclosure, the operation state of the target node may be normal operation or abnormal. When the target node normally operates, if the topology query message is received, the response is immediately carried out, and topology response information is returned, wherein the topology response information comprises the topology information of the target node. When the target node is in an abnormal state and cannot normally operate, if the topology query message is received, the response cannot be carried out, and the topology response information cannot be returned.
In the embodiment of the disclosure, the running state of the target node can be judged by whether the topology response information returned by the target node is received, when the running state of the target node is abnormal, the target node can be considered to be unable to work normally by processing the variant data packet, and at the moment, the test result can be determined to be abnormal, thereby realizing effective monitoring of the abnormality generated in the test.
In the embodiment of the disclosure, after each variant data packet is sent, a topology query message may be sent to the target node to determine a test result for the variant data packet.
As an example, the topology query message may be a "topology query message (Topology Query Message)" in easy mesh for querying another network node for topology information. The topology response message may be a "topology response message (Topology response message)" in Easy Mesh for returning topology information after receiving "Topology Query Message". Therefore, the test abnormality monitoring of the automatic fuzzy test in the Easy Mesh network control stage is realized.
In an optional manner of the disclosure, the method further includes:
and carrying out mutation processing on the pre-acquired original data packet based on a pre-configured mutation strategy to obtain a mutation data packet.
In the embodiment of the disclosure, the data packet collected under the actual working condition may be used as an original data packet, for example, may be a data packet in a real Easy Mesh network control stage.
In an optional manner of the disclosure, the original data packet is a data packet in a Type-Length-Value (TLV) format, and the mutation processing is performed on the pre-collected original data packet based on a pre-configured mutation policy, including any one of the following:
modifying the value of a Length field in the original data packet;
the TLV group in the original data packet is modified, and the TLV group is composed of a Type field, a Length field and a Value field.
The data packet in the Easy Mesh network control phase is based on the institute of electrical and electronics engineers (Institute of Electrical and Electronics Engineers, IEEE) 1905.1a protocol in which the data format of the data packet is defined as TLV, wherein the Length field defines the Length of the Value, and the Value field indicates the actual Value.
In the embodiment of the disclosure, the mutation policy may include modifying the Value of the Length field in the original data packet, and modifying the Length field to an abnormal Value inconsistent with the Value field may trigger some memory corruption holes in the TLV parsing process.
As one example, modifying the value of the Length field in the original packet includes:
modifying the value of the Length field in the original data packet to enable the value of the modified Length field to be larger than a first preset value or smaller than a second preset value, wherein the first preset value is larger than the second preset value.
The first preset value may be set to a larger value, the second preset value may be set to a smaller value, the value of the Length field is modified to make the variation value obtained after variation be too large or too small, and too small the value of the Length field may cause problems such as out-of-range reading or integer overflow, and too large the value of the Length field may cause problems such as out-of-range writing.
In the embodiment of the disclosure, the mutation policy may also include modifying the TLV group in the original data packet. A triple of a Type field, a Length field, and a Value field included in one TLV data may be determined as a TLV group. Modifying TLV sets may result in logical vulnerabilities associated with memory corruption, such as Double-release (Double-Free), use-After-release (Use-After-Free), etc.
As one example, the modification of the TLV set in the original data packet includes any of the following:
increasing TLV groups in the original data packet;
deleting the TLV group in the original data packet;
the TLV group in the original packet is modified.
In the embodiment of the disclosure, the TLV group in the original data packet is added, and a manner of copying the original TLV group in the original data packet may be adopted. And modifying the TLV group in the original data packet, namely correspondingly modifying the Type field, the Length field and the Value field.
In the embodiment of the disclosure, the fuzzy test is performed on the variant data packet obtained after the variant processing based on the variant strategy, so that most problems in TLV analysis can be covered.
In an optional manner of the disclosure, after determining that the test result is abnormal, the method further includes:
and storing the variant data packet corresponding to the abnormal test result.
In the embodiment of the disclosure, after determining that an abnormality exists in the test, the variant data packet causing the abnormality may be stored, so as to facilitate subsequent analysis to determine the vulnerability.
In the embodiment of the disclosure, after the test for one variant data packet is completed, if the test result is normal, the test for the next variant data packet can be performed; if the test result is abnormal, the abnormal variation data packet can be stored, and then the target node is restarted.
The scheme provided by the embodiment of the disclosure can be applied to automatic fuzzy test in the Easy Mesh network control stage, and the vulnerability mining for Easy Mesh is realized. The protocol fields of all network control stages of the easy mesh can be automatically covered without manual intervention, and the memory damage scene caused by all TLV analysis is covered, so that the test efficiency is higher.
As an example, a schematic structural diagram of a test system provided by an embodiment of the present disclosure is shown in fig. 2.
As shown in fig. 2, the IEEE1905.1a network controls the raw data input for acquiring pre-acquired raw data packets as input data for the test system.
And performing TLV mutation, namely performing mutation processing on the original data packet based on the mutation strategy to obtain a mutated data packet.
The IEEE1905.1a packet transmitter is used for transmitting the variant data packet to the target node for fuzzy test.
Ieee1905.1a crash (crash) monitoring is used to monitor anomalies in the test.
Ieee1905.1a crash Log (crash Log) is used to record anomalies under test.
Fig. 3 shows a flow chart of another test method provided by an embodiment of the disclosure, and as shown in fig. 3, the method may mainly include:
step S310: performing mutation processing on the pre-acquired original data packet based on a pre-configured mutation strategy to obtain a mutation data packet;
step S320: the variant data packet is sent to a target node, so that the target node processes the variant data packet;
step S330: sending a topology query message to a target node;
step S340: if topology response information returned by the target node based on the topology query message is received, determining that the test result is normal; if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
The data packet collected under the actual working condition may be used as an original data packet, for example, may be a data packet in a real Easy Mesh network control stage.
The mutation data packet is a data packet used for the fuzzy test after the mutation processing, for example, may be a data packet in the Easy Mesh network control stage after the mutation processing.
The target node is used for processing the variant data packet after receiving the variant data packet, and the target node may not be a specific device, but may be a logic entity, which may be disposed on a device separately, or may be disposed on a device together with other target nodes. As one example, the target node may be a network node in a Mesh networking.
The topology query message is used for querying topology information of the target node.
In the embodiment of the disclosure, the operation state of the target node can be determined by sending the topology query message to the target node, and the operation state of the target node can reflect the test result.
In the embodiment of the disclosure, the operation state of the target node may be normal operation or abnormal. When the target node normally operates, if the topology query message is received, the response is immediately carried out, and topology response information is returned, wherein the topology response information comprises the topology information of the target node. When the target node is in an abnormal state and cannot normally operate, if the topology query message is received, the response cannot be carried out, and the topology response information cannot be returned.
In the embodiment of the disclosure, the running state of the target node can be judged by whether the topology response information returned by the target node is received, when the running state of the target node is abnormal, the target node can be considered to be unable to work normally by processing the variant data packet, and at the moment, the test result can be determined to be abnormal, thereby realizing effective monitoring of the abnormality generated in the test.
In the embodiment of the disclosure, after each variant data packet is sent, a topology query message may be sent to the target node to determine a test result for the variant data packet.
As an example, the topology query message may be a "topology query message (Topology Query Message)" in Easy Mesh for querying another network node for topology information. The topology response message may be a "topology response message (Topology response message)" in Easy Mesh for returning topology information after receiving "Topology Query Message". Therefore, the test abnormality monitoring of the automatic fuzzy test in the Easy Mesh network control stage is realized.
The method provided by the implementation of the disclosure comprises the steps of obtaining a variable data packet by carrying out mutation processing on a pre-collected original data packet, sending the variable data packet to a target node, enabling the target node to process the variable data packet, sending a topology query message to the target node, and determining that a test result is normal if topology response information returned by the target node based on the topology query message is received; if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal. In the scheme, the operating state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operating state of the target node, effective monitoring on abnormality in the test is realized, and the normal implementation of the automatic test is ensured.
Based on the same principle as the method shown in fig. 1, fig. 4 shows a schematic structural diagram of a test device provided by an embodiment of the present disclosure, and as shown in fig. 4, the test device 40 may include:
the mutation data sending module 410 is configured to send a mutation data packet to a target node, so that the target node processes the mutation data packet;
the test result determining module 420 is configured to determine a test result by sending a topology query message to the target node.
According to the device provided by the implementation of the disclosure, the variant data packet is sent to the target node, so that the target node processes the variant data packet, and the test result is determined by sending the topology query message to the target node. In the scheme, the operating state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operating state of the target node, effective monitoring on abnormality in the test is realized, and the normal implementation of the automatic test is ensured.
Optionally, the test result determining module is specifically configured to:
sending a topology query message to a target node;
if topology response information returned by the target node based on the topology query message is received, determining that the test result is normal;
if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
Optionally, the apparatus further includes:
the mutation processing module is used for carrying out mutation processing on the pre-collected original data packet based on a pre-configured mutation strategy to obtain a mutation data packet.
Optionally, the original data packet is a TLV-format data packet, and the mutation processing module is specifically configured to, when performing mutation processing on the pre-collected original data packet based on a pre-configured mutation policy, any one of the following:
modifying the value of the Length field in the original data packet;
and modifying a TLV group in the original data packet, wherein the TLV group consists of a Type field, a Length field and a Value field.
Optionally, the mutation processing module is specifically configured to, when modifying the value of the Length field in the original data packet:
modifying the value of the Length field in the original data packet to enable the value of the modified Length field to be larger than a first preset value or smaller than a second preset value, wherein the first preset value is larger than the second preset value.
Optionally, the mutation processing module is specifically configured to, when modifying the TLV group in the original data packet, any one of the following:
increasing TLV groups in the original data packet;
deleting the TLV group in the original data packet;
the TLV group in the original packet is modified.
Optionally, the apparatus further includes:
and the anomaly recording module is used for storing the variant data packet corresponding to the abnormal test result after the abnormal test result is determined.
It will be appreciated that the above-described modules of the test apparatus in the embodiments of the present disclosure have the function of implementing the corresponding steps of the test method in the embodiment shown in fig. 1. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules may be software and/or hardware, and each module may be implemented separately or may be implemented by integrating multiple modules. For the functional description of each module of the above-mentioned testing device, reference may be specifically made to the corresponding description of the testing method in the embodiment shown in fig. 1, which is not repeated herein.
Based on the same principle as the method shown in fig. 3, fig. 5 shows a schematic structural diagram of another test device provided by an embodiment of the present disclosure, and as shown in fig. 5, the test device 50 may include:
the mutation processing module 510 is configured to perform mutation processing on the pre-collected original data packet based on a pre-configured mutation policy, so as to obtain a mutated data packet;
the mutation data sending module 520 is configured to send a mutation data packet to a target node, so that the target node processes the mutation data packet;
a topology query message sending module 530 that sends a topology query message to the target node;
the test result determining module 540 is configured to determine that the test result is normal when topology response information returned by the target node based on the topology query message is received; and when the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
The device provided by the implementation of the disclosure obtains a variable data packet by performing mutation processing on a pre-collected original data packet, sends the variable data packet to a target node, enables the target node to process the variable data packet, sends a topology query message to the target node, and determines that a test result is normal if topology response information returned by the target node based on the topology query message is received; if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal. In the scheme, the operating state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operating state of the target node, effective monitoring on abnormality in the test is realized, and the normal implementation of the automatic test is ensured.
It will be appreciated that the above-described modules of the test apparatus in the embodiments of the present disclosure have the function of implementing the corresponding steps of the test method in the embodiment shown in fig. 3. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules may be software and/or hardware, and each module may be implemented separately or may be implemented by integrating multiple modules. The functional description of each module of the above testing device may be specifically referred to the corresponding description of the testing method in the embodiment shown in fig. 3, and will not be repeated herein.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the test methods as provided by the embodiments of the present disclosure.
Compared with the prior art, the electronic equipment enables the target node to process the variant data packet by sending the variant data packet to the target node, and determines a test result by sending the topology query message to the target node. In the scheme, the operating state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operating state of the target node, effective monitoring on abnormality in the test is realized, and the normal implementation of the automatic test is ensured.
The readable storage medium is a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a test processing method as provided by an embodiment of the present disclosure.
Compared with the prior art, the readable storage medium enables the target node to process the variant data packet by sending the variant data packet to the target node, and determines a test result by sending a topology query message to the target node. In the scheme, the operating state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operating state of the target node, effective monitoring on abnormality in the test is realized, and the normal implementation of the automatic test is ensured.
The computer program product comprises a computer program which, when executed by a processor, implements a test method as provided by embodiments of the present disclosure.
Compared with the prior art, the computer program product enables the target node to process the variant data packet by sending the variant data packet to the target node, and determines a test result by sending a topology query message to the target node. In the scheme, the operating state of the target node is determined by sending the topology query message to the target node, so that the test result is judged according to the operating state of the target node, effective monitoring on abnormality in the test is realized, and the normal implementation of the automatic test is ensured.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 610 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 620 or a computer program loaded from a storage unit 680 into a Random Access Memory (RAM) 630. In the RAM 630, various programs and data required for the operation of the device 600 may also be stored. The computing unit 610, ROM 620, and RAM 630 are connected to each other by a bus 640. An input/output (I/O) interface 650 is also connected to bus 640.
Various components in device 600 are connected to I/O interface 650, including: an input unit 660 such as a keyboard, a mouse, etc.; an output unit 670 such as various types of displays, speakers, and the like; a storage unit 680 such as a magnetic disk, an optical disk, or the like; and a communication unit 690 such as a network card, modem, wireless communication transceiver, etc. The communication unit 690 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 610 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 610 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 610 performs the test methods provided in the embodiments of the present disclosure. For example, in some embodiments, performing the test methods provided in the embodiments of the present disclosure may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 680. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 600 via ROM 620 and/or communication unit 690. One or more steps of the test methods provided in the embodiments of the present disclosure may be performed when the computer program is loaded into RAM 630 and executed by computing unit 610. Alternatively, in other embodiments, the computing unit 610 may be configured to perform the test methods provided in the embodiments of the present disclosure in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (16)
1. A method of testing, comprising:
the method comprises the steps of sending a variant data packet to a target node, and enabling the target node to process the variant data packet; the target node is a network node in Mesh networking;
the mutation data packet is a data packet in an Easy Mesh network control stage after mutation processing, and is used for triggering memory damage loopholes of the target node;
and determining a test result by sending a topology query message to the target node.
2. The method of claim 1, wherein the determining the test result by sending a topology query message to the target node comprises:
sending a topology query message to the target node;
if topology response information returned by the target node based on the topology query message is received, determining that the test result is normal;
and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
3. The method of claim 1 or 2, further comprising:
and carrying out mutation processing on the data packet in the pre-collected Easy Mesh network control stage based on a pre-configured mutation strategy to obtain a mutation data packet.
4. A method according to claim 3, wherein the original data packet is a data packet in a type-length-value TLV format, and the mutation processing is performed on the pre-collected original data packet based on a pre-configured mutation policy, including any one of the following:
modifying the value of the Length field in the original data packet;
and modifying the TLV group in the original data packet, wherein the TLV group consists of a Type field, a Length field and a Value field.
5. The method of claim 4, wherein said modifying the value of the Length field in the original data packet comprises:
modifying the value of the Length field in the original data packet, so that the modified value of the Length field is larger than a first preset value or smaller than a second preset value, and the first preset value is larger than the second preset value.
6. The method of claim 4 or 5, wherein said modifying the TLV set in the original data packet comprises any one of:
increasing TLV groups in the original data packet;
deleting the TLV group in the original data packet;
and modifying the TLV group in the original data packet.
7. The method of claim 2, after determining that the test result is abnormal, the method further comprising:
and storing the variant data packet corresponding to the abnormal test result.
8. A test apparatus comprising:
the variable data sending module is used for sending the variable data packet to a target node so that the target node processes the variable data packet; the target node is a network node in Mesh networking;
the mutation data packet is a data packet in an Easy Mesh network control stage after mutation processing, and is used for triggering memory damage loopholes of the target node;
and the test result determining module is used for determining a test result by sending a topology query message to the target node.
9. The apparatus of claim 8, wherein the test result determination module is specifically configured to:
sending a topology query message to the target node;
if topology response information returned by the target node based on the topology query message is received, determining that the test result is normal;
and if the topology response information returned by the target node based on the topology query message is not received, determining that the test result is abnormal.
10. The apparatus of claim 8 or 9, further comprising:
the mutation processing module is used for carrying out mutation processing on the data packet in the pre-collected Easy Mesh network control stage based on a pre-configured mutation strategy to obtain a mutation data packet.
11. The apparatus of claim 10, wherein the original data packet is a TLV-formatted data packet, and the mutation processing module is specifically configured to, when performing mutation processing on the pre-collected original data packet based on a pre-configured mutation policy, any one of the following:
modifying the value of the Length field in the original data packet;
and modifying the TLV group in the original data packet, wherein the TLV group consists of a Type field, a Length field and a Value field.
12. The apparatus of claim 11, wherein the mutation processing module is configured to, when modifying a value of a Length field in the original data packet:
modifying the value of the Length field in the original data packet, so that the modified value of the Length field is larger than a first preset value or smaller than a second preset value, and the first preset value is larger than the second preset value.
13. The apparatus according to claim 11 or 12, wherein the mutation processing module is specifically configured to, when modifying the TLV set in the original data packet, any one of the following:
increasing TLV groups in the original data packet;
deleting the TLV group in the original data packet;
and modifying the TLV group in the original data packet.
14. The apparatus of claim 9, further comprising:
and the anomaly recording module is used for storing the variant data packet corresponding to the abnormal test result after the abnormal test result is determined.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111365218.3A CN114070752B (en) | 2021-11-17 | 2021-11-17 | Test method, test device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111365218.3A CN114070752B (en) | 2021-11-17 | 2021-11-17 | Test method, test device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114070752A CN114070752A (en) | 2022-02-18 |
CN114070752B true CN114070752B (en) | 2023-09-12 |
Family
ID=80277607
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111365218.3A Active CN114070752B (en) | 2021-11-17 | 2021-11-17 | Test method, test device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114070752B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114928482B (en) * | 2022-05-13 | 2023-06-27 | 北京百度网讯科技有限公司 | Method and device for testing network communication function of software, electronic equipment and storage medium |
CN114978644B (en) * | 2022-05-13 | 2023-07-25 | 北京百度网讯科技有限公司 | Method and device for testing distribution network function of software, electronic equipment and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5869130B2 (en) * | 2011-08-30 | 2016-02-24 | クアルコム,インコーポレイテッド | Topology discovery in hybrid networks |
CN108337266B (en) * | 2018-03-07 | 2020-08-11 | 中国科学院信息工程研究所 | Efficient protocol client vulnerability discovery method and system |
CN112217680B (en) * | 2020-10-19 | 2022-12-02 | 中国信息通信研究院 | Controller capability benchmark test method and device based on software-defined wide area network |
CN113507436B (en) * | 2021-06-02 | 2022-08-23 | 中国人民解放军63880部队 | Power grid embedded terminal fuzzy test method aiming at GOOSE protocol |
-
2021
- 2021-11-17 CN CN202111365218.3A patent/CN114070752B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN114070752A (en) | 2022-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108833202B (en) | Method, device and computer readable storage medium for detecting fault link | |
CN114070752B (en) | Test method, test device, electronic equipment and computer readable storage medium | |
US10831630B2 (en) | Fault analysis method and apparatus based on data center | |
CN114024884B (en) | Test method, test device, electronic equipment and storage medium | |
US20220207383A1 (en) | Fault propagation condition extraction method and apparatus and storage medium | |
US20140006554A1 (en) | System management apparatus, system management method, and storage medium | |
CN117424850B (en) | Abnormal link aggregation method, query method, device, equipment and medium | |
CN115865701B (en) | Node control method, device and system based on daisy chain network | |
CN114567536B (en) | Abnormal data processing method, device, electronic equipment and storage medium | |
CN108512698B (en) | Network disaster tolerance method and device and electronic equipment | |
CN117478590A (en) | Message processing method and device, electronic equipment and storage medium | |
CN116938953A (en) | Block chain-based data processing method and device, electronic equipment and storage medium | |
CN114500326B (en) | Abnormality detection method, abnormality detection device, electronic device, and storage medium | |
US20200267054A1 (en) | Determining the importance of network devices based on discovered topology, managed endpoints, and activity | |
CN111258845A (en) | Detection of event storms | |
CN116418600B (en) | Node security operation and maintenance method, device, equipment and storage medium | |
CN118170617B (en) | Cluster anomaly detection method and device, electronic equipment and storage medium | |
CN114338491B (en) | Port detection method and device based on Raw Socket | |
CN116541833A (en) | Processing method, device and storage medium for network malicious model | |
CN117319252A (en) | Network quality detection result display method, device, equipment and storage medium | |
CN117499161B (en) | Network security testing method and device, electronic equipment and storage medium | |
CN117459373A (en) | Network diagnosis method, device and storage medium | |
CN118784559A (en) | Port fault processing method, device, equipment and medium | |
CN117596202A (en) | Data processing method, device, electronic equipment and storage medium | |
CN116208554A (en) | FPGA-based flow table processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |