Analyzing method and device for binary data of application program, equipment and medium
By comparing the text information of the application binary data with the sensitive information library, we can identify and modify sensitive information, which solves the problems of complexity of multi-department collaborative work and time-consuming testing during the application development and upgrade process, and improves the quality and quality of the application. Release efficiency.
Patent Information
- Application Number
- CN202410625878.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-09-06
AI Technical Summary
In the process of application development and upgrade, multi-department collaborative work and complex testing processes lead to a lot of time consumption, affecting release time and normal business advancement. How to achieve efficient verification has become an urgent problem to be solved.
By comparing the text information of binary data with the sensitive information database, the sensitive information in the application is identified and modified, and the binary data acquisition module, data segment identification module, text information storage module, target text information identification module and prompt instruction generation module are used to achieve Convert and compare text information to generate sensitive information prompt instructions.
It improves the quality and reliability of applications, detects and modifies sensitive information in a timely manner to avoid affecting business advancement, simplifies the multi-department collaborative testing process, and improves release efficiency.
Smart Images

Figure CN118605877A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and specifically relates to a method, device, equipment and medium for parsing binary data of an application. Background Art
[0002] Each application needs to be checked for sensitive information before release to prevent the presence of bad information in the application and damage to the network environment.
[0003] At present, the process of application upgrade or development often requires the collaboration of multiple departments. After the development or upgrade is completed, multiple departments need to collaborate on testing. The process is highly complex and takes a lot of time, affecting the release time of the application and the normal progress of business work.
[0004] Therefore, how to efficiently verify an application is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method, device, equipment and medium for parsing binary data of an application, which can identify sensitive information in the application by comparing the text information of the binary data with a sensitive information library, thereby facilitating timely modification of sensitive information, improving the quality and reliability of the application, and avoiding affecting the advancement of related businesses.
[0006] In a first aspect, an embodiment of the present application provides a method for parsing binary data of an application, the method comprising:
[0007] Get binary data for application execution;
[0008] Identify whether the binary data has a data segment with preset characteristics;
[0009] If yes, convert the data segment into text information according to the pre-built parsing rules, and save the text information into an output file;
[0010] Compare the text information stored in the output file with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison;
[0011] If so, a sensitive information prompt instruction is generated.
[0012] Further, converting the data segment into text information according to the pre-built parsing rules, and saving the text information into an output file, includes:
[0013] Convert the data segment into text information according to pre-built parsing rules, and identify the type of the text information;
[0014] According to the text information type, the text information is saved in an output file corresponding to the text information type.
[0015] Furthermore, the method further comprises:
[0016] Receive parsing tasks;
[0017] Determine the target text information type according to the parsing task;
[0018] Accordingly, the text information stored in the output file is compared with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison, including:
[0019] Determining a target output file according to the target text information type;
[0020] The text information stored in the target output file is compared with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison.
[0021] Furthermore, the text information stored in the output file is compared with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison, including:
[0022] Compare the text information stored in the output file with the sensitive words in the sensitive information library to identify whether the output file contains sensitive words;
[0023] and / or,
[0024] The text information stored in the output file is compared with the encryption key in the sensitive information library to identify whether the output file contains the encryption key.
[0025] Furthermore, after the text information is saved in the output file, the method further includes:
[0026] Comparing the text information stored in the output file with the application analysis library to identify whether the output file contains target text information that is consistent with the comparison;
[0027] If yes, determining the framework and / or class in which the application runs according to the target file information;
[0028] The application is analyzed based on the framework and / or class.
[0029] Furthermore, after the text information is saved in the output file, the method further includes:
[0030] In response to the version comparison operation, obtaining a historical version output file parsed from a previous version of the application;
[0031] Compare the output file of the current version with the output file of the historical version;
[0032] The code change verification is performed according to the comparison result.
[0033] Furthermore, after the text information is saved in the output file, the method further includes:
[0034] In response to the version update test operation, obtaining a previous version output file parsed by the application in the previous version;
[0035] The output file of the current version is compared with the output file of the previous version, and the update range of the current version of the application program compared with the previous version is determined according to the comparison result.
[0036] In a second aspect, an embodiment of the present application provides a device for parsing binary data of an application, the device comprising:
[0037] A binary data acquisition module is used to acquire binary data for application program operation;
[0038] A data segment identification module, used to identify whether the binary data has a data segment with preset characteristics;
[0039] A text information saving module is used to convert the data segment into text information according to the pre-built parsing rules in the case of a data segment with preset characteristics, and save the text information into an output file;
[0040] A target text information identification module is used to compare the text information stored in the output file with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison;
[0041] The prompt instruction generation module is used to generate sensitive information prompt instructions when there is target text information with consistent comparison.
[0042] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0043] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0044] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0045] In an embodiment of the present application, binary data for running an application is obtained; it is identified whether the binary data has a data segment with preset characteristics; if so, the data segment is converted into text information according to a pre-constructed parsing rule, and the text information is saved in an output file; the text information saved in the output file is compared with a sensitive information library to identify whether the output file has target text information that is consistent with the comparison; if so, a sensitive information prompt instruction is generated. Through the above-mentioned method for parsing binary data of an application, sensitive information in the application can be identified by comparing the text information of the binary data with the sensitive information library, which is conducive to timely modification of sensitive information, improving the quality and reliability of the application, and avoiding affecting the advancement of related businesses. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a structural diagram of a binary data parsing device for an application provided in Embodiment 1 of the present application;
[0047] Figure 2 This is a schematic diagram of Mach-O file conversion provided in Example 1 of the present application;
[0048] Figure 3 It is a structural diagram of a binary data parsing device for an application provided in Embodiment 2 of the present application;
[0049] Figure 4 It is a structural diagram of a binary data parsing device for an application provided in Embodiment 3 of the present application;
[0050] Figure 5 It is a structural diagram of a binary data parsing device for an application provided in Embodiment 4 of the present application;
[0051] Figure 6 It is a structural diagram of a binary data parsing device for an application provided in Embodiment 5 of the present application;
[0052] Figure 7 It is a structural diagram of a binary data parsing device for an application provided in Embodiment 6 of the present application;
[0053] Figure 8 It is a structural diagram of a binary data parsing device for an application provided in Embodiment 7 of the present application;
[0054] Fig. 9 It is a flowchart of a method for parsing binary data of an application provided in Embodiment 8 of the present application;
[0055] Fig.10 It is a structural diagram of an electronic device provided in Example 9 of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0057] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0058] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0059] In conjunction with the accompanying drawings, the following detailed description is given of a method, apparatus, device and medium for parsing binary data of an application program provided by an embodiment of the present application through specific embodiments and their application scenarios.
[0060] Embodiment 1
[0061] Figure 1 1 is a flow chart of a method for parsing binary data of an application provided in Example 1 of the present application. Figure 1 As shown, the specific steps include:
[0062] S101, obtaining binary data for running an application program;
[0063] The application scenario of this solution can be in the scenario of developing, updating and testing application programs.
[0064] Based on the above scenario, it can be understood that the executor of this scenario can be a smart terminal for developing or testing applications, such as a desktop computer, a laptop computer, a tablet computer, and an interactive multimedia device, etc., and no excessive limitations are made here.
[0065] An application can be a computer program that completes one or more specific tasks. When the application runs in user mode, it can interact with the user and has a visual user interface. Binary can be a number system widely used in computing technology. Binary data is a number represented by two digits, 0 and 1. Its base is 2, and the carry rule is "add one whenever there are two", and the borrow rule is "borrow one as two". Binary data can be the machine language corresponding to the application. For example, Mach-O file.
[0066] The method for obtaining binary data for application operation is that the smart terminal sends a request for obtaining binary data to the application. After the application responds, it obtains its own binary data and encodes it into transmission information and sends it to the smart terminal. The smart terminal decodes it, obtains the corresponding binary data and stores it in a specified location.
[0067] S102, identifying whether the binary data has a data segment with a preset feature; if so, executing S103;
[0068] The preset feature can be to predetermine the data segment type to be detected, and obtain the unique digital code in the data segment type (for example, using a specific number of 0s and 1s and an arrangement method to represent different data segment types) as the preset feature. By identifying the preset feature, the data segment to be detected in the binary data can be quickly found.
[0069] The method for identifying whether binary data has a data segment with preset characteristics can be to obtain the preset characteristics of the data segment type to be detected in advance, and the intelligent terminal extracts and traverses the binary data obtained from the application program, identifies whether there is a data segment consistent with the preset characteristics in the binary data, and extracts the data segment consistent with the preset characteristics. For example, in a Mach-O file, the preset characteristics are 0011010101 and 0101010000, then traverse the Mach-O file, identify whether there is a data segment containing 0011010101 or 0101010000 in the Mach-O file, and extract the data segment containing 0011010101 or 0101010000.
[0070] S103, converting the data segment into text information according to a pre-built parsing rule, and saving the text information into an output file;
[0071] The pre-built parsing rules can be the correspondence between binary data and text information, which can be realized by computers through parsing rules. Text information can be language information corresponding to binary that can be understood by relevant personnel, such as programs, texts, and pictures. The computer can obtain the corresponding text information by decompiling the binary data.
[0072] The method of saving text information to the output file is that after the smart terminal identifies all data segments in the binary file that are consistent with the preset features, each data segment is extracted, the binary is converted into corresponding text information according to the pre-built parsing rules, and each text information is classified according to the data segment type, and the text information of the same category is stored in the same output file.
[0073] For example, Figure 2 This is a Mach-O file conversion diagram, such as Figure 2 As shown, the smart terminal sends a request to the application on the macOS or iOS device, decompresses the obtained application package, browses its internal file structure, and finds the Mach-O file based on the binary 0 and 1 digital features. The Mach-O file is reversely parsed to obtain the text information corresponding to the Mach-O file, and the text information is classified and extracted and stored in the corresponding types of files 1, 2, and 3.
[0074] S104, comparing the text information stored in the output file with the sensitive information database to identify whether the output file contains target text information that is consistent with the comparison; if so, executing S105;
[0075] The sensitive information database can be a database that stores all sensitive information. The staff can update the sensitive information database by adding or deleting sensitive information. The sensitive information database can be searched and compared by smart terminals to determine whether the comparison file contains sensitive information, or whether the information to be detected is sensitive information. Among them, sensitive information can include information that does not need to appear on the client in the application, such as secret keys. If the user obtains the secret key, it may be used to steal other people's information, seriously affecting the order and fairness of the application. In addition, sensitive information can also include words or uncivilized language with sensitive political tendencies, violent tendencies, unhealthy colors, and some special sensitive words that are set to apply only to this application according to its actual situation.
[0076] The method for identifying whether the output file contains target text information that is consistent with the comparison can be that the staff sets up the sensitive information library in advance, or a smart terminal obtains a general sensitive information library through big data, and the staff modifies the general sensitive information library to obtain a sensitive information library suitable for the current application. The smart terminal traverses the text information in the output file according to the constructed sensitive information library, and identifies whether the text information contains target text information such as words, characters, and secret keys that are consistent with those in the sensitive information library.
[0077] S105: Generate a sensitive information prompt instruction.
[0078] The method of generating a sensitive information prompt instruction is to extract the target text information after identifying the target text information in the file transmitted by the smart terminal, and obtain the corresponding position of the target text information in the binary data, and write the target text information and the corresponding position as a sensitive information prompt instruction to prompt relevant personnel to delete the sensitive information, thereby ensuring that the application can be successfully reviewed and released.
[0079] In an embodiment of the present application, binary data for running an application is obtained; it is identified whether the binary data has a data segment with preset characteristics; if so, the data segment is converted into text information according to a pre-constructed parsing rule, and the text information is saved in an output file; the text information saved in the output file is compared with a sensitive information library to identify whether the output file has target text information that is consistent with the comparison; if so, a sensitive information prompt instruction is generated. Through the above-mentioned method for parsing binary data of an application, sensitive information in the application can be identified by comparing the text information of the binary data with the sensitive information library, which is conducive to timely modification of sensitive information, improving the quality and reliability of the application, and avoiding affecting the advancement of related businesses.
[0080] Embodiment 2
[0081] Figure 3 This is a flow chart of the method for parsing binary data of an application provided in Example 2 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: converting the data segment into text information according to the pre-constructed parsing rules, and saving the text information into an output file, including: converting the data segment into text information according to the pre-constructed parsing rules, and identifying the type of the text information; according to the type of the text information, saving the text information into an output file corresponding to the type of the text information.
[0082] like Figure 3 As shown, specifically including the following:
[0083] S201, obtaining binary data for running an application program;
[0084] S202, identifying whether the binary data has a data segment with a preset feature; if so, executing S203;
[0085] S203, converting the data segment into text information according to a pre-built parsing rule, and identifying the type of the text information;
[0086] The text information type may be a category distinguished according to the format of the text information, for example, it may include a program framework, text, and a picture.
[0087] The method of identifying the type of text information may be to extract features from the text information, determine the type of the text information according to the feature information of the text information, and add a type tag to the text information of the determined text information type for identification by the smart terminal.
[0088] S204, according to the text information type, saving the text information into an output file corresponding to the text information type;
[0089] The method of saving text information to an output file corresponding to the text information type can be to establish multiple output folders of the same type in advance according to the text information types that may appear, identify the text information type label of the data segment conversion, match the type label with the type label of each output folder, and store the text information in the output folder with the highest degree of match with the type label.
[0090] S205, comparing the text information stored in the output file with the sensitive information database to identify whether the output file contains target text information that is consistent with the comparison; if so, executing S206;
[0091] S206: Generate a sensitive information prompt instruction.
[0092] The advantage of this setting in this solution is that text information can be classified by type and saved in output files of corresponding types to avoid garbled characters appearing in the output files due to different text information types, which affects the recognition of sensitive information.
[0093] Embodiment 3
[0094] Figure 4 It is a flow chart of the method for parsing binary data of an application provided in Example 3 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: the method also includes: receiving a parsing task; determining the target text information type according to the parsing task; correspondingly, comparing the text information stored in the output file with the sensitive information library, and identifying whether the output file has the target text information that is consistent with the comparison, including: determining the target output file according to the target text information type; comparing the text information stored in the target output file with the sensitive information library, and identifying whether the output file has the target text information that is consistent with the comparison.
[0095] like Figure 4 As shown, specifically including the following:
[0096] S301, obtaining binary data for running an application program;
[0097] S302, identifying whether the binary data has a data segment with a preset feature; if so, executing S303;
[0098] S303, converting the data segment into text information according to a pre-built parsing rule, and identifying the type of the text information;
[0099] S304, according to the text information type, saving the text information into an output file corresponding to the text information type;
[0100] S305, receiving a parsing task;
[0101] The analysis task can be the purpose of the staff's needs. For example, the analysis task can include sensitive information screening, version comparison, and update testing.
[0102] The method of receiving the analysis task may be that the intelligent terminal displays the executable analysis tasks through a display device for the staff to select, and determines the content of the analysis task in response to the selection operation of the staff.
[0103] S306, determining the target text information type according to the parsing task;
[0104] The method of determining the target text information type according to the parsing task can be that after determining the Juexi task, the intelligent terminal calls the operation process associated with the parsing task and obtains the text information type that needs to be detected in the parsing task as the target text information type. For example, if the parsing task is the detection of sensitive words, the target text information type is a text type.
[0105] S307, determining a target output file according to the target text information type;
[0106] The target output file may be determined by, after determining the target text information type, obtaining a type tag consistent with the target text type in the output file, and using the output file corresponding to the type tag as the target output file.
[0107] S308, comparing the text information stored in the target output file with the sensitive information library, and identifying whether the output file contains target text information that is consistent with the comparison; if so, executing S309;
[0108] The method for identifying whether the output file contains target text information that is consistent with the comparison can be that the smart terminal traverses the text information in the target output file according to the sensitive information library, and identifies whether the text information contains target text information such as words, characters, and secret keys that are consistent with the sensitive information library.
[0109] S309: Generate a sensitive information prompt instruction.
[0110] The advantage of this setting is that the target text information type required can be determined according to the parsing task, without the need to parse all output files, which greatly reduces the workload of the parsing task and improves the parsing efficiency and sensitive information identification efficiency.
[0111] Embodiment 4
[0112] Figure 5 It is a flow chart of the method for parsing binary data of an application provided in Example 4 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: comparing the text information stored in the output file with the sensitive information library, and identifying whether the output file has target text information that is consistent with the comparison, including: comparing the text information stored in the output file with sensitive words in the sensitive information library, and identifying whether the output file contains sensitive words; and / or, comparing the text information stored in the output file with the encryption key in the sensitive information library, and identifying whether the output file contains the encryption key.
[0113] like Figure 5 As shown, specifically including the following:
[0114] S401, obtaining binary data for running an application program;
[0115] S402, identifying whether the binary data has a data segment with a preset feature; if so, executing S403;
[0116] S403, converting the data segment into text information according to a pre-built parsing rule, and saving the text information into an output file;
[0117] S404, comparing the text information stored in the output file with the sensitive words in the sensitive information library to identify whether the output file contains sensitive words;
[0118] and / or,
[0119] Compare the text information stored in the output file with the encryption key in the sensitive information library to identify whether the output file contains the encryption key; if so, execute S405;
[0120] The method of identifying whether the output file contains sensitive words can be that the intelligent terminal determines the comparison range of sensitive words in the sensitive information database according to the review level. For example, if the review level is high, the comparison range of sensitive words is larger, the number is larger, and the review is more stringent; if the review level is low, the comparison range of sensitive words is small, and some words are no longer sensitive words compared to when the review level is high. In the text information saved in the output file, it is identified whether there are sensitive words within the comparison range. If so, it is determined that the output file contains sensitive words.
[0121] A method for identifying whether the output file contains an encryption key is that the staff can pre-add the encryption key of the current application to the sensitive information library through the smart terminal, and the smart terminal can identify whether there is information consistent with the encryption key in the text information saved in the output file. If so, it is determined that the output file contains an encryption key.
[0122] In this embodiment, if the smart terminal recognizes that there are sensitive words and / or encryption keys in the output file, it can determine that the output file has target text information with consistent comparison. At this time, the sensitive words and / or encryption keys in the output file are the target text information.
[0123] S405: Generate a sensitive information prompt instruction.
[0124] The benefit of this scheme is that it can identify sensitive words and encryption keys in the output file to prevent sensitive words from affecting the release of the application and users from using keys to disrupt the order of the application.
[0125] Embodiment 5
[0126] Figure 6 It is a flow chart of the method for parsing binary data of an application provided in Example 5 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: after saving the text information in the output file, the method also includes: comparing the text information saved in the output file with the application analysis library, identifying whether there is target text information in the output file that is consistent with the comparison; if so, determining the framework and / or class in which the application runs according to the target file information; and analyzing the application according to the framework and / or class.
[0127] like Figure 6 As shown, specifically including the following:
[0128] S501, obtaining binary data for running an application program;
[0129] S502, identifying whether the binary data has a data segment with a preset feature; if so, executing S503;
[0130] S503, converting the data segment into text information according to a pre-built parsing rule, and saving the text information into an output file;
[0131] S504, comparing the text information stored in the output file with the application analysis library to identify whether the output file contains target text information that is consistent with the comparison; if so, executing S505;
[0132] The application analysis library can be a data information library that includes various program frameworks and classes. The staff can use the application analysis library to query the program frameworks and / or classes of various functional types, and by filling in the program framework, the required functions can be realized. Among them, the program framework can be an application skeleton that can be customized by application developers, which is manifested as a set of abstract components and methods of interaction between component instances. The program framework is a reusable design of the entire or part of the system. Classes are the basis for information encapsulation in object-oriented programming. Each class contains data descriptions and a set of functions that operate data or transmit messages.
[0133] A method for identifying whether there is target text information that is consistent with the comparison in the output file may be to obtain an application analysis library, and have the intelligent terminal identify whether there is a program framework and / or class that is consistent with the application analysis library in the text information saved in the output file. If so, it is determined that there is target text information that is consistent with the comparison in the output file, and the program framework and / or class that is consistent with the application analysis library is used as the target text information.
[0134] S505, determining the framework and / or class of the application program according to the target file information;
[0135] The framework and / or class in which the application is running may be determined by extracting the framework in the target file information, removing the custom part in the framework, retaining the reusable part, and counting the classes in the target file information.
[0136] S506: Analyze the application according to the framework and / or class.
[0137] The application can be analyzed by analyzing the framework and / or class functions of the application, and predicting the operation process and design ideas of the application based on the functional structure of the framework and / or class of the application.
[0138] The benefit of this scheme is that the output file can be compared with the application analysis library to analyze the framework and class used in the current application, which is helpful for assisting staff to understand and grasp the application construction ideas and methods.
[0139] Embodiment 6
[0140] Figure 7 This is a flow chart of the method for parsing binary data of an application provided in Example 6 of the present application. This solution makes a better improvement on the above-mentioned embodiment, and the specific improvement is: after saving the text information into the output file, the method further includes: in response to the version comparison operation, obtaining the historical version output file parsed by the application in the previous version; comparing the output file of the current version with the historical version output file; and verifying the code change according to the comparison result.
[0141] like Figure 7 As shown, specifically including the following:
[0142] S601, obtaining binary data for running an application program;
[0143] S602, identifying whether the binary data has a data segment with a preset feature; if so, executing S603;
[0144] S603, converting the data segment into text information according to a pre-built parsing rule, and saving the text information into an output file;
[0145] S604, in response to the version comparison operation, obtaining a historical version output file obtained by parsing the application in a previous version;
[0146] The version comparison operation can be a requirement task selected by the staff in the function selection interface of the smart terminal. The smart terminal can perform different operation processes according to the requirement task, and then output the requirement results for the staff. The version comparison operation requires the smart terminal to compare the current version of the same application with the historical version to obtain the differences between the current version.
[0147] The historical version output file may be that after the application is released, as the business develops, it may encounter function superposition, product revision, program vulnerabilities, emergency closure of some functions, etc., and the application needs to be updated to meet user needs and improve user experience. The output file of the application before the update is the historical version output file. In this embodiment, for an application that has been updated multiple times, there may be multiple historical version output files.
[0148] The method of obtaining the historical version output file can be that the intelligent terminal obtains the historical parsing record of the current application and extracts the output file after parsing the historical version of the application. In this embodiment, the staff can set the retention time of the historical version parsing record, and the intelligent terminal automatically records each parsing operation performed and deletes the record after the retention time reaches it.
[0149] S605, comparing the output file of the current version with the output file of the historical version;
[0150] The method of comparing the output file of the current version with the output file of the historical version can be to compare the output file of the current version with the output file of the historical version of the same type according to the type of the output file, and identify the parts of the output file of the current version that are modified, added or deleted compared with the output file of the historical version.
[0151] S606: Verify the code change according to the comparison result.
[0152] The method of verifying code changes based on the comparison results can be to extract text information in the output file of the current version that is inconsistent with the output file of the historical version and the text information that is added or deleted, and compare the extracted text information with the sensitive information library to detect whether the updated content contains information that affects the normal release of the application, and prompt relevant staff after identifying sensitive information in the text information.
[0153] The advantage of this solution is that sensitive information can be checked for text information that is inconsistent between the current version and the historical version. This allows the sensitive information in the updated part of the application to be identified and changed in a timely manner to avoid potential risks of the application even if the content is not updated synchronously on the test side.
[0154] Embodiment 7
[0155] Figure 8 This is a flowchart of the method for parsing binary data of an application provided in Embodiment 7 of the present application. This solution makes a better improvement on the above embodiment, and the specific improvement is: after saving the text information into the output file, the method further includes: in response to the version update test operation, obtaining the previous version output file parsed by the application in the previous version; comparing the output file of the current version with the output file of the previous version, and determining the update range of the current version of the application compared with the previous version according to the comparison result.
[0156] like Figure 8 As shown, specifically including the following:
[0157] S701, obtaining binary data for running an application program;
[0158] S702, identifying whether the binary data has a data segment with a preset feature; if so, executing S703;
[0159] S703, converting the data segment into text information according to a pre-built parsing rule, and saving the text information into an output file;
[0160] S704, in response to the version update test operation, obtaining a previous version output file obtained by parsing the application in the previous version;
[0161] The version update test operation may be to test the updated application to obtain the operational requirements of the update scope.
[0162] The method for obtaining the previous version output file parsed by the application in the previous version is that the smart terminal extracts the parsing record of the current application, identifies the parsing record closest to the current parsing time, and extracts the output file therein as the previous version output file parsed by the current application in the previous version.
[0163] S705: Compare the output file of the current version with the output file of the previous version, and determine the update range of the current version of the application program compared with the previous version according to the comparison result.
[0164] A method for determining the update scope of the current version of the application compared to the previous version may be to match the output file of the current version of the application with the output file of the previous version extracted from the record according to the category of the output file, identify inconsistent information between the output file of the current version and the output file of the previous version, and compare the inconsistent information with the application analysis library to obtain the program running framework and / or class of the inconsistent information as the update scope of the current version of the application.
[0165] The benefit of this setting is that the update scope of the updated application compared with the previous version can be obtained to assist staff in quickly finding the updated content for tracking and detection, which is conducive to saving detection time and improving detection efficiency.
[0166] Embodiment 8
[0167] Fig. 9 It is a structural diagram of a binary data parsing device for an application provided in Example 8 of the present application.
[0168] like Fig. 9 As shown, specifically including the following:
[0169] The binary data acquisition module 801 is used to acquire binary data for the application to run;
[0170] A data segment identification module 802, used to identify whether the binary data has a data segment with preset characteristics;
[0171] The text information saving module 803 is used to convert the data segment into text information according to the pre-built parsing rules in the case of a data segment with preset characteristics, and save the text information into an output file;
[0172] The target text information identification module 804 is used to compare the text information stored in the output file with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison;
[0173] The prompt instruction generating module 805 is used to generate a sensitive information prompt instruction when there is target text information with consistent comparison.
[0174] In the embodiment of the present application, a binary data acquisition module is used to acquire binary data for the application to run; a data segment identification module is used to identify whether the binary data has a data segment with preset characteristics; a text information storage module is used to convert the data segment into text information according to a pre-constructed parsing rule in the case of a data segment with preset characteristics, and save the text information into an output file; a target text information identification module is used to compare the text information stored in the output file with the sensitive information library, and identify whether the output file has target text information that is consistent with the comparison; a prompt instruction generation module is used to generate a sensitive information prompt instruction in the case of having target text information that is consistent with the comparison. Through the above-mentioned binary data parsing device of an application, sensitive information in the application can be identified by comparing the text information of the binary data with the sensitive information library, which is conducive to timely modification of sensitive information, improving the quality and reliability of the application, and avoiding affecting the advancement of related businesses.
[0175] In the embodiment of the present application, a device for parsing binary data of an application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0176] In the embodiment of the present application, a device for parsing binary data of an application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0177] The binary data parsing device of an application provided in an embodiment of the present application can implement each process implemented in the above-mentioned method embodiments, and will not be described again here to avoid repetition.
[0178] Embodiment 9
[0179] like Fig.10As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901, a memory 902, and a program or instruction stored in the memory 902 and executable on the processor 901. When the program or instruction is executed by the processor 901, each process of an embodiment of a binary data parsing device for the above-mentioned application is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0180] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0181] Embodiment 10
[0182] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the embodiment of the binary data parsing device of the above-mentioned application are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0183] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0184] Embodiment 11
[0185] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the embodiment of the binary data parsing device of the above-mentioned application program, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0186] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0187] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0188] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0189] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0190] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for parsing binary data of an application, characterized in that: The method comprises: Get binary data for application execution; Identify whether the binary data has a data segment with preset characteristics; If yes, convert the data segment into text information according to the pre-built parsing rules, and save the text information into an output file; Compare the text information stored in the output file with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison; If so, a sensitive information prompt instruction is generated.
2. The method for parsing binary data of an application according to claim 1, characterized in that: Convert the data segment into text information according to the pre-built parsing rules, and save the text information into an output file, including: Convert the data segment into text information according to pre-built parsing rules, and identify the type of the text information; According to the text information type, the text information is saved in an output file corresponding to the text information type.
3. The method for parsing binary data of an application according to claim 2, characterized in that: The method further comprises: Receive parsing tasks; Determine the target text information type according to the parsing task; Accordingly, the text information stored in the output file is compared with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison, including: Determining a target output file according to the target text information type; The text information stored in the target output file is compared with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison.
4. The method for parsing binary data of an application according to claim 1, characterized in that: Comparing the text information stored in the output file with the sensitive information database to identify whether the output file contains target text information that is consistent with the comparison, including: Compare the text information stored in the output file with the sensitive words in the sensitive information library to identify whether the output file contains sensitive words; and / or, The text information stored in the output file is compared with the encryption key in the sensitive information library to identify whether the output file contains the encryption key.
5. The method for parsing binary data of an application according to claim 1, characterized in that: After saving the text information into an output file, the method further comprises: Comparing the text information stored in the output file with the application analysis library to identify whether the output file contains target text information that is consistent with the comparison; If yes, determining the framework and / or class in which the application runs according to the target file information; The application is analyzed based on the framework and / or class.
6. The method for parsing binary data of an application according to claim 1, characterized in that: After saving the text information into an output file, the method further comprises: In response to the version comparison operation, obtaining a historical version output file parsed from a previous version of the application; Compare the output file of the current version with the output file of the historical version; The code change verification is performed according to the comparison result.
7. The method for parsing binary data of an application according to claim 1, characterized in that: After saving the text information into an output file, the method further comprises: In response to the version update test operation, obtaining a previous version output file parsed by the application in the previous version; The output file of the current version is compared with the output file of the previous version, and the update range of the current version of the application program compared with the previous version is determined according to the comparison result.
8. A device for analyzing binary data of an application, characterized in that: The device comprises: A binary data acquisition module is used to acquire binary data for application program operation; A data segment identification module, used to identify whether the binary data has a data segment with preset characteristics; A text information saving module is used to convert the data segment into text information according to the pre-built parsing rules in the case of a data segment with preset characteristics, and save the text information into an output file; A target text information identification module is used to compare the text information stored in the output file with the sensitive information library to identify whether the output file contains target text information that is consistent with the comparison; The prompt instruction generation module is used to generate sensitive information prompt instructions when there is target text information with consistent comparison.
9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of a method for parsing binary data of an application program as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of a method for parsing binary data of an application program according to any one of claims 1 to 7 are implemented.
