Binary file analysis method, device, equipment and medium
A binary file and parsing method technology, applied in the field of binary file parsing, can solve problems such as difficulty in meeting log parsing requirements, inability to apply to various binary file parsing occasions, etc., to reduce duplication of work and ensure flexibility.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0042] Embodiment 1 provides a method for parsing a binary file, which aims to display the relationship between binary members by establishing a tree structure of the structure. When parsing a binary file, a recursive algorithm is used to obtain the parsed text. In this way, it can adapt to binary membership relationships of various depths and binary structures of various lengths without repeated programming.
[0043] A recursive function refers to a function that calls the function itself. The definition of a recursive function is as follows: For a certain function f(x), its domain is the set A, then if for a certain value X0 in the set A, its function The value f(x0) is determined by f(f(x0)), then f(x) is called a recursive function. The recursive function will stop the recursive call when the termination condition is reached. The termination condition is usually that there is no element to call. The recursive function will return the linked list after the recursive call en...
Embodiment 2
[0096] Embodiment 2 discloses a device corresponding to the binary file parsing method of the above embodiment, which is the virtual device structure of the above embodiment, please refer to Figure 4 shown, including:
[0097] A construction module 210, configured to obtain a parsing rule description file, and call a recursive function to construct a tree structure according to the parsing rule description file;
[0098] The receiving module 220 is used to receive the binary file, and convert the binary file into several binary structures;
[0099] The parsing module 230 is used to recursively invoke the tree structure of the plurality of binary structures in order to obtain the parsing text of the binary file.
[0100] Preferably, the parsing rule description file includes members, membership relationships, and binary value translation tables of the members, wherein the members include member tags and member IDs, and the member tags are divided into replacement tags and add...
Embodiment 3
[0116] Figure 5 A schematic structural diagram of an electronic device provided in Embodiment 3 of the present invention, such as Figure 5 As shown, the electronic device includes a processor 310, a memory 320, an input device 330, and an output device 340; the number of processors 310 in a computer device may be one or more, Figure 5 Take a processor 310 as an example; the processor 310, memory 320, input device 330 and output device 340 in the electronic device can be connected by bus or other methods, Figure 5 Take connection via bus as an example.
[0117] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer-executable programs and modules, such as the program instructions / modules corresponding to the method for detecting the movement state of the relay armature in the embodiment of the present invention (for example, a binary file parsing device The building module 210, the receiving module 220 and the parsing modul...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com