CN111949608A - Method and device for searching text in APP - Google Patents

Method and device for searching text in APP Download PDF

Info

Publication number
CN111949608A
CN111949608A CN202010733798.6A CN202010733798A CN111949608A CN 111949608 A CN111949608 A CN 111949608A CN 202010733798 A CN202010733798 A CN 202010733798A CN 111949608 A CN111949608 A CN 111949608A
Authority
CN
China
Prior art keywords
preset
application program
module
program file
file
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.)
Granted
Application number
CN202010733798.6A
Other languages
Chinese (zh)
Other versions
CN111949608B (en
Inventor
赵义
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Youkun Information Technology Co ltd
Original Assignee
Guangzhou Zhangtao Network Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Zhangtao Network Technology Co ltd filed Critical Guangzhou Zhangtao Network Technology Co ltd
Priority to CN202010733798.6A priority Critical patent/CN111949608B/en
Publication of CN111949608A publication Critical patent/CN111949608A/en
Application granted granted Critical
Publication of CN111949608B publication Critical patent/CN111949608B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Library & Information Science (AREA)
  • Stored Programmes (AREA)

Abstract

The invention aims to provide a method and equipment for searching texts in APP (application), wherein after a shell-broken application program file package is exported, a grep command can be used for automatically searching preset texts in the application program file package, manual searching of the preset texts is not needed, the searching efficiency can be improved, and the searching error rate is reduced. In addition, in order to avoid the situation that the preset text is missed by using the grep command in the previous embodiment, in the embodiment, whether the preset text is included in each preset header file is searched, so that the text content can be analyzed more accurately, and the search accuracy is further improved. Other clients can log in the background of the source server through a browser or other tools to check whether each application program file package contains preset text such as specific sdk packages, so that the clients can select sdk packages as a preference.

Description

Method and device for searching text in APP
Technical Field
The invention relates to the field of computers, in particular to a method and equipment for searching texts in an APP.
Background
To help customers analyze a particular text distribution in mainstream apps, such as the sdk string distribution used, a separate analysis of each app is required to output the result of whether the app contains a particular character.
In the prior art, the app after shell smashing needs to be acquired, manual grep analysis is performed on the app after shell smashing, efficiency is too low, errors are easily generated in an output result page, and the result of whether specific characters are contained in the output result page is not accurate enough.
Disclosure of Invention
The invention aims to provide a method and equipment for searching texts in APP.
According to one aspect of the invention, a method for searching texts in an APP at a target server side is provided, and the method comprises the following steps:
acquiring a batch of application program file packages subjected to shell breaking from a source server;
searching whether preset texts are contained in each application program file packet by using grep commands,
if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server;
if the preset texts are not searched, the preset header files are respectively obtained from the application program file packages, whether the preset texts are contained in the preset header files is searched, if the preset texts are contained, the application program file packages corresponding to the preset texts are recorded, and the records are fed back to the source server.
Further, in the above method, searching whether each application program file package contains a preset text by using a grep command, and if yes, recording the application program file package corresponding to the preset text and feeding back the record to the source server includes:
starting a plurality of first threads and a grep module corresponding to each first thread through a main module;
acquiring addresses of corresponding application program file packages through the grep modules, acquiring the corresponding application program file packages based on the addresses, and decompressing the application program file packages to obtain a first folder;
acquiring a macro-o file path from the first folder through each grep module, and transmitting the macro-o file path to a grep command module;
searching whether the content corresponding to the path of the macro-o file contains a preset search text or not through a grep command module and by using a grep command;
if the searched application program file packet contains the preset text, recording the application program file packet corresponding to the preset text through a grep command module, and feeding back the record to the grep module;
feeding records back to the main module through the grep module;
and feeding back the record to the source server through the main module.
Further, in the above method, if no preset text is found, obtaining a preset header file from each application package, respectively, searching whether each preset header file contains the preset text, if yes, recording the application package corresponding to the preset text, and feeding back the record to the source server, includes:
starting a plurality of second threads and a decompression module corresponding to each second thread through a main module;
acquiring addresses of corresponding application program file packages through each decompression module, acquiring the corresponding application program file packages based on the addresses, and decompressing the application program file packages to obtain a second folder;
obtaining a macro-o file path from the second folder through each decompression module, and transmitting the macro-o file path to a class-dump command module;
deriving the address of the h header file from the content corresponding to the path of the macro-o file by using a class-dump command module and a class-dump command, and outputting the derived address of the h header file to a character searching module;
traversing whether the h-head file contains a search preset text or not based on the address of the h-head file through the character search module;
if the file contains the preset text, recording an application program file packet corresponding to the preset text through a character searching module, and feeding back the record to the decompression module;
feeding back the record to the main module through the decompression module;
and feeding back the record to the source server through the main module.
Further, in the above method, feeding back the record to the source server includes:
and when the number of records which are not fed back reaches a preset threshold value, feeding back the records which are not fed back to the source server.
According to another aspect of the present invention, there is also provided a target server, wherein the target server includes:
the acquisition device is used for acquiring a batch of application program file packages subjected to shell breaking from the source server;
the grep device is used for searching whether preset texts are contained in each application program file packet by adopting a grep command;
the decompression device is used for respectively acquiring preset header files from each application program file packet if the preset texts are not searched, and searching whether the preset texts are contained in each preset header file;
and the feedback device is used for recording the application program file packet corresponding to the preset text if the preset text is found, and feeding back the record to the source server.
Further, in the target server, the grep device is configured to obtain addresses of corresponding application program file packages through the grep modules, obtain corresponding application program file packages based on the addresses, and decompress the application program file packages to obtain a first folder; acquiring a macro-o file path from the first folder through each grep module, and transmitting the macro-o file path to a grep command module; searching whether the content corresponding to the path of the macro-o file contains a preset search text or not through a grep command module and by using a grep command;
the feedback device is used for recording an application program file packet corresponding to a preset text through a grep command module and feeding back the record to the grep module if the preset text is found; feeding records back to the main module through the grep module; and feeding back the record to the source server through the main module.
Further, in the target server, the decompression device is configured to start the plurality of second threads and the decompression module corresponding to each second thread through the main module; acquiring addresses of corresponding application program file packages through each decompression module, acquiring the corresponding application program file packages based on the addresses, and decompressing the application program file packages to obtain a second folder; obtaining a macro-o file path from the second folder through each decompression module, and transmitting the macro-o file path to a class-dump command module; deriving the address of the h header file from the content corresponding to the path of the macro-o file by using a class-dump command module and a class-dump command, and outputting the derived address of the h header file to a character searching module; traversing whether the h-head file contains a search preset text or not based on the address of the h-head file through the character search module;
the feedback device is used for recording an application program file packet corresponding to a preset text through a character searching module if the preset text is searched, and feeding back the record to the decompression module; feeding back the record to the main module through the decompression module; and feeding back the record to the source server through the main module.
Further, in the above target server, the feedback device is configured to feed back the records that are not fed back to the source server when the number of records that are not fed back reaches a preset threshold.
According to another aspect of the present invention, there is also provided a computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a batch of application program file packages subjected to shell breaking from a source server;
searching whether preset texts are contained in each application program file packet by using grep commands,
if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server;
if the preset texts are not searched, the preset header files are respectively obtained from the application program file packages, whether the preset texts are contained in the preset header files is searched, if the preset texts are contained, the application program file packages corresponding to the preset texts are recorded, and the records are fed back to the source server.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
acquiring a batch of application program file packages subjected to shell breaking from a source server;
searching whether preset texts are contained in each application program file packet by using grep commands,
if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server;
if the preset texts are not searched, the preset header files are respectively obtained from the application program file packages, whether the preset texts are contained in the preset header files is searched, if the preset texts are contained, the application program file packages corresponding to the preset texts are recorded, and the records are fed back to the source server.
Compared with the prior art, the method and the device have the advantages that the preset text can be automatically searched in the application program file package by using the grep command after the shell-breaking application program file package is exported, the preset text does not need to be manually searched, the searching efficiency can be improved, and the searching error rate can be reduced. In addition, in order to avoid the situation that the preset text is missed by using the grep command in the previous embodiment, in the embodiment, whether the preset text is included in each preset header file is searched, so that the text content can be analyzed more accurately, and the search accuracy is further improved. Other clients can log in the background of the source server through a browser or other tools to check whether each application program file package contains preset text such as specific sdk packages, so that the clients can select sdk packages as a preference.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a schematic diagram illustrating a method and device for searching a text in an APP according to an embodiment of the present invention;
FIG. 2 shows a schematic diagram of an embodiment of the present invention;
fig. 3 shows a schematic diagram according to one embodiment of the invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As shown in fig. 1, the present invention provides a method for searching a text in an APP of a target server, where the method includes:
step S1, acquiring a batch of application program file packages (ipa data) subjected to shell breaking from a source server;
here, the ipa source server can send a batch of ipa data to the ipa target server at regular time;
step S2, using a grow command (global search a Regular Expression and Print, text search tool) to search whether each application file package contains a preset text,
here, the preset text may be a preset sdk character string;
the system comprises an ipa target server and a client side, wherein the ipa target server is locally provided with an ipa receiving and distributing system, after receiving an application program file package, a grep command is used for searching a preset text such as a set special character string pair line for the local application program file package, and the searched text is stored;
and step S3, if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server.
In the method, after the shell-broken application program file packet is exported, the grep command can be used for automatically searching the preset text in the application program file packet, manual searching of the preset text is not needed, the searching efficiency can be improved, and the searching error rate can be reduced. Other clients can log in the background of the source server through a browser or other tools to check whether each application program file package contains preset text such as specific sdk packages, so that the clients can select sdk packages as a preference.
As shown in fig. 2, in an embodiment of the method for searching for a text in an APP at a target server, in step S2, a grow command (global search a Regular Expression and Print, text search tool) is used to search whether a preset text is included in each application package, where the method includes:
step S21, starting a plurality of first threads and grep modules corresponding to the first threads through the main module;
step S22, acquiring addresses of corresponding application program file packages through grep modules, acquiring corresponding application program file packages based on the addresses, and decompressing the application program file packages to obtain a first folder;
step S23, obtaining a macro-o file path from the first folder through each grep module, and transmitting the macro-o file path to a grep command module;
step S24, searching whether the content corresponding to the map-o file path contains a preset search text or not through a grep command module and by using a grep command;
step S3, if the search result contains a preset text, recording the application package corresponding to the preset text, and feeding back the record to the source server, including:
step S31, if a preset text is found, recording an application program file packet corresponding to the preset text through a grep command module, and feeding back the record to the grep module;
step S32, feeding records back to the main module through the grep module;
step S33, feeding back the record to the source server through the master module.
Specifically, as shown in fig. 2:
1. after entering a python main module, starting a plurality of first threads, preparing to process grep service, and transmitting an address (ipa address) of an application program file package to be processed;
2. each first thread simultaneously starts an independent grep module;
3, in the grep module, acquiring the address of the application program file packet, and decompressing by using an unship command;
4. transmitting the decompressed macro-o file path in the first folder to the grep command module
5, receiving the macro-o file path by the grep command module, searching characters by using a grep command of the system, returning a result to the grep module, transmitting the result to the main module by the grep module, making different reactions by the main module according to different results, and if the result is not searched, going to step 7 and going to step 6;
6. returning the result to the ipa source server;
7. the decompression service module as shown in figure 3 is invoked.
According to the embodiment, the searching efficiency of the preset text can be further improved in a multithreading automatic batch mode.
As shown in fig. 1, in an embodiment of the method for searching for a text in an APP at a target server, in step S2, after searching for whether a preset text is included in each application package by using a grow command (a global search a Regular Expression and Print, a text search tool), the method further includes:
step S4, if no preset text is found, respectively obtaining preset header files from each application program file package, and searching whether the preset text is contained in each preset header file;
and step S5, if the file contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server.
Here, in order to avoid the situation that the preset text is missed by using the grep command in the previous embodiment, in the embodiment, whether the preset text is included in each preset header file is searched, so that the text content can be analyzed more accurately, and the search accuracy is further improved.
In an embodiment of the method for searching for a text in an APP at a target server, in step S4, if no preset text is found, obtaining preset header files from each application package, and searching whether each preset header file contains the preset text, respectively, includes:
step S41, starting a plurality of second threads and a decompression module corresponding to each second thread through the main module;
step S42, acquiring the address of the corresponding application program file packet through each decompression module, acquiring the corresponding application program file packet based on the address, decompressing the application program file packet to obtain a second folder;
step S43, obtaining a macro-o file path from the second folder through each decompression module, and transmitting the macro-o file path to a class-dump command module;
step S44, deriving the address of the h header file from the content corresponding to the path of the macro-o file by a class-dump command module and using a class-dump command, and outputting the derived address of the h header file to a character searching module;
step S45, traversing whether the h-header file contains a preset search text or not through the character searching module based on the address of the h-header file;
step S5, if the search result contains a preset text, recording the application package corresponding to the preset text, and feeding back the record to the source server, including:
step S51, if a preset text is found, recording an application program file packet corresponding to the preset text through a character searching module, and feeding back the record to the decompressing module;
step S52, feeding back the record to the main module through the decompression module;
step S53, feeding back the record to the source server through the master module.
In particular, as shown in figure 3,
1. after entering a python main module, starting a plurality of second threads to prepare for processing decompression service and transmitting the address of an application program file packet to be processed;
2. each second thread starts an independent decompression module at the same time;
3. in the decompression module, the address of the application program file packet is obtained, and decompression is carried out by using an unship command;
4. transmitting the decompressed macro-o file path in the second folder to a class-dump command module;
5, the Class-dump command module receives the path, and a Class-dump command of the system is used for deriving h head files and outputting addresses to the character searching module;
6. the character searching and searching module receives the address of the folder, traverses the folder, searches the preset character and returns the result to the decompression module;
7. and the decompression module transmits the result to the main module and returns the result to the ipa source server.
According to the embodiment, the searching efficiency of the preset text can be further improved in a multithreading automatic batch mode.
In an embodiment of the method for searching for a text in an APP at a target server, in step S3 or S5, feeding back the record to the source server includes:
and when the number of records which are not fed back reaches a preset threshold value, feeding back the records which are not fed back to the source server.
Here, a preset threshold may be set, for example, the preset threshold is 500, and when the number of records that are not fed back reaches 500, the target server pushes a result to the source server once, so as to save communication cost.
As shown in fig. 1, the present invention also provides a target server, including:
the acquisition device is used for acquiring a batch of application program file packages (ipa data) subjected to shell breaking from the source server;
here, the ipa source server can send a batch of ipa data to the ipa target server at regular time;
a grow device for searching whether the preset text is contained in each application program file packet by adopting grow command (text search tool),
here, the preset text may be a preset sdk character string;
the system comprises an ipa target server and a client side, wherein the ipa target server is locally provided with an ipa receiving and distributing system, after receiving an application program file package, a grep command is used for searching a preset text such as a set special character string pair line for the local application program file package, and the searched text is stored;
and the feedback device is used for recording the application program file packet corresponding to the preset text if the preset text is found, and feeding back the record to the source server.
In the method, after the shell-broken application program file packet is exported, the grep command can be used for automatically searching the preset text in the application program file packet, manual searching of the preset text is not needed, the searching efficiency can be improved, and the searching error rate can be reduced. Other clients can log in the background of the source server through a browser or other tools to check whether each application program file package contains preset text such as specific sdk packages, so that the clients can select sdk packages as a preference.
As shown in fig. 2, in an embodiment of the target server, the grep device is configured to obtain, through each grep module, an address of a corresponding application program file package, obtain, based on the address, the corresponding application program file package, and decompress the application program file package to obtain a first folder; acquiring a macro-o file path from the first folder through each grep module, and transmitting the macro-o file path to a grep command module; searching whether the content corresponding to the path of the macro-o file contains a preset search text or not through a grep command module and by using a grep command;
the feedback device is used for recording an application program file packet corresponding to a preset text through a grep command module and feeding back the record to the grep module if the preset text is found; feeding records back to the main module through the grep module; and feeding back the record to the source server through the main module.
Specifically, as shown in fig. 2:
1. after entering a python main module, starting a plurality of first threads, preparing to process grep service, and transmitting an address (ipa address) of an application program file package to be processed;
2. each first thread simultaneously starts an independent grep module;
3, in the grep module, acquiring the address of the application program file packet, and decompressing by using an unship command;
4. transmitting the decompressed macro-o file path in the first folder to the grep command module
5, receiving the macro-o file path by the grep command module, searching characters by using a grep command of the system, returning a result to the grep module, transmitting the result to the main module by the grep module, making different reactions by the main module according to different results, and if the result is not searched, going to step 7 and going to step 6;
6. returning the result to the ipa source server;
7. the decompression service module as shown in figure 3 is invoked.
According to the embodiment, the searching efficiency of the preset text can be further improved in a multithreading automatic batch mode.
As shown in fig. 1, in an embodiment of the target server of the present invention, the decompressing device is configured to, if no preset text is found, respectively obtain preset header files from each application file package, and search whether the preset text is included in each preset header file;
and the feedback device is used for recording the application program file packet corresponding to the preset text if the preset text is found, and feeding back the record to the source server.
Here, in order to avoid the situation that the preset text is missed by using the grep command in the previous embodiment, in the embodiment, whether the preset text is included in each preset header file is searched, so that the text content can be analyzed more accurately, and the search accuracy is further improved.
In an embodiment of the target server of the present invention, the decompression device is configured to start the plurality of second threads and the decompression module corresponding to each second thread through the main module; acquiring addresses of corresponding application program file packages through each decompression module, acquiring the corresponding application program file packages based on the addresses, and decompressing the application program file packages to obtain a second folder; obtaining a macro-o file path from the second folder through each decompression module, and transmitting the macro-o file path to a class-dump command module; deriving the address of the h header file from the content corresponding to the path of the macro-o file by using a class-dump command module and a class-dump command, and outputting the derived address of the h header file to a character searching module; traversing whether the h-head file contains a search preset text or not based on the address of the h-head file through the character search module;
the feedback device is used for recording an application program file packet corresponding to a preset text through a character searching module if the preset text is searched, and feeding back the record to the decompression module; feeding back the record to the main module through the decompression module; and feeding back the record to the source server through the main module.
In particular, as shown in figure 3,
1. after entering a python main module, starting a plurality of second threads to prepare for processing decompression service and transmitting the address of an application program file packet to be processed;
2. each second thread starts an independent decompression module at the same time;
3. in the decompression module, the address of the application program file packet is obtained, and decompression is carried out by using an unship command;
4. transmitting the decompressed macro-o file path in the second folder to a class-dump command module;
5, the Class-dump command module receives the path, and a Class-dump command of the system is used for deriving h head files and outputting addresses to the character searching module;
6. the character searching and searching module receives the address of the folder, traverses the folder, searches the preset character and returns the result to the decompression module;
7. and the decompression module transmits the result to the main module and returns the result to the ipa source server.
According to the embodiment, the searching efficiency of the preset text can be further improved in a multithreading automatic batch mode.
In an embodiment of the target server of the present invention, the feedback device is configured to feed back the records that are not fed back to the source server when the number of records that are not fed back reaches a preset threshold.
Here, a preset threshold may be set, for example, the preset threshold is 500, and when the number of records that are not fed back reaches 500, the target server pushes a result to the source server once, so as to save communication cost.
According to another aspect of the present invention, there is also provided a computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a batch of application program file packages subjected to shell breaking from a source server;
searching whether preset texts are contained in each application program file packet by using grep commands,
if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server;
if the preset texts are not searched, the preset header files are respectively obtained from the application program file packages, whether the preset texts are contained in the preset header files is searched, if the preset texts are contained, the application program file packages corresponding to the preset texts are recorded, and the records are fed back to the source server.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
acquiring a batch of application program file packages subjected to shell breaking from a source server;
searching whether preset texts are contained in each application program file packet by using grep commands,
if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server;
if the preset texts are not searched, the preset header files are respectively obtained from the application program file packages, whether the preset texts are contained in the preset header files is searched, if the preset texts are contained, the application program file packages corresponding to the preset texts are recorded, and the records are fed back to the source server.
For details of embodiments of each device and storage medium of the present invention, reference may be made to corresponding parts of each method embodiment, and details are not described herein again.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present invention can be applied as a computer program product, such as computer program instructions, which when executed by a computer, can invoke or provide the method and/or technical solution according to the present invention through the operation of the computer. Program instructions which invoke the methods of the present invention may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the invention herein comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or solution according to embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (10)

1. A method for searching texts in an APP (application) of a target server side is disclosed, wherein the method comprises the following steps:
acquiring a batch of application program file packages subjected to shell breaking from a source server;
searching whether preset texts are contained in each application program file packet by using grep commands,
if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server;
if the preset texts are not searched, the preset header files are respectively obtained from the application program file packages, whether the preset texts are contained in the preset header files is searched, if the preset texts are contained, the application program file packages corresponding to the preset texts are recorded, and the records are fed back to the source server.
2. The method according to claim 1, wherein searching for whether each application file package contains a preset text by using a grep command, recording the application file package corresponding to the preset text if the application file package contains the preset text, and feeding back the record to the source server, comprises:
starting a plurality of first threads and a grep module corresponding to each first thread through a main module;
acquiring addresses of corresponding application program file packages through grep modules, acquiring corresponding application program file packages based on the addresses of the application program file packages, and decompressing the application program file packages to obtain a first folder;
acquiring a macro-o file path from the first folder through each grep module, and transmitting the macro-o file path to a grep command module;
searching whether the content corresponding to the path of the macro-o file contains a preset search text or not through a grep command module and by using a grep command;
if the searched application program file packet contains the preset text, recording the application program file packet corresponding to the preset text through a grep command module, and feeding back the record to the grep module;
feeding records back to the main module through the grep module;
and feeding back the record to the source server through the main module.
3. The method of claim 1, wherein if no preset text is found, obtaining a preset header file from each application file package, respectively, searching whether each preset header file contains the preset text, if no preset text is found, recording the application file package corresponding to the preset text, and feeding back the record to the source server, comprises:
starting a plurality of second threads and a decompression module corresponding to each second thread through a main module;
acquiring the address of a corresponding application program file packet through each decompression module, acquiring the corresponding application program file packet based on the address of the application program file packet, and decompressing the application program file packet to obtain a second folder;
obtaining a macro-o file path from the second folder through each decompression module, and transmitting the macro-o file path to a class-dump command module;
deriving the address of the h header file from the content corresponding to the path of the macro-o file by using a class-dump command module and a class-dump command, and outputting the derived address of the h header file to a character searching module;
traversing whether the h-head file contains a search preset text or not based on the address of the h-head file through the character search module;
if the file contains the preset text, recording an application program file packet corresponding to the preset text through a character searching module, and feeding back the record to the decompression module;
feeding back the record to the main module through the decompression module;
and feeding back the record to the source server through the main module.
4. The method of claim 1, wherein feeding back the record to the origin server comprises:
and when the number of records which are not fed back reaches a preset threshold value, feeding back the records which are not fed back to the source server.
5. A target server, wherein the target server comprises:
the acquisition device is used for acquiring a batch of application program file packages subjected to shell breaking from the source server;
the grep device is used for searching whether preset texts are contained in each application program file packet by adopting a grep command;
the decompression device is used for respectively acquiring preset header files from each application program file packet if the preset texts are not searched, and searching whether the preset texts are contained in each preset header file;
and the feedback device is used for recording the application program file packet corresponding to the preset text if the preset text is found, and feeding back the record to the source server.
6. The target server according to claim 5, wherein the grep device is configured to obtain, through each grep module, an address of a corresponding application file package, obtain, based on the address, the corresponding application file package, and decompress the application file package to obtain the first folder; acquiring a macro-o file path from the first folder through each grep module, and transmitting the macro-o file path to a grep command module; searching whether the content corresponding to the path of the macro-o file contains a preset search text or not through a grep command module and by using a grep command;
the feedback device is used for recording an application program file packet corresponding to a preset text through a grep command module and feeding back the record to the grep module if the preset text is found; feeding records back to the main module through the grep module; and feeding back the record to the source server through the main module.
7. The target server according to claim 5, wherein the decompression device is configured to start, by the main module, a plurality of second threads and a decompression module corresponding to each second thread; acquiring addresses of corresponding application program file packages through each decompression module, acquiring the corresponding application program file packages based on the addresses, and decompressing the application program file packages to obtain a second folder; obtaining a macro-o file path from the second folder through each decompression module, and transmitting the macro-o file path to a class-dump command module; deriving the address of the h header file from the content corresponding to the path of the macro-o file by using a class-dump command module and a class-dump command, and outputting the derived address of the h header file to a character searching module; traversing whether the h-head file contains a search preset text or not based on the address of the h-head file through the character search module;
the feedback device is used for recording an application program file packet corresponding to a preset text through a character searching module if the preset text is searched, and feeding back the record to the decompression module; feeding back the record to the main module through the decompression module; and feeding back the record to the source server through the main module.
8. The target server according to claim 5, wherein the feedback means is configured to feed back the unrevealed records to the source server when the number of unrevealed records reaches a preset threshold.
9. A computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a batch of application program file packages subjected to shell breaking from a source server;
searching whether preset texts are contained in each application program file packet by using grep commands,
if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server;
if the preset texts are not searched, the preset header files are respectively obtained from the application program file packages, whether the preset texts are contained in the preset header files is searched, if the preset texts are contained, the application program file packages corresponding to the preset texts are recorded, and the records are fed back to the source server.
10. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
acquiring a batch of application program file packages subjected to shell breaking from a source server;
searching whether preset texts are contained in each application program file packet by using grep commands,
if the searched application program file package contains the preset text, recording the application program file package corresponding to the preset text, and feeding back the record to the source server;
if the preset texts are not searched, the preset header files are respectively obtained from the application program file packages, whether the preset texts are contained in the preset header files is searched, if the preset texts are contained, the application program file packages corresponding to the preset texts are recorded, and the records are fed back to the source server.
CN202010733798.6A 2020-07-27 2020-07-27 Method and device for searching text in APP Active CN111949608B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010733798.6A CN111949608B (en) 2020-07-27 2020-07-27 Method and device for searching text in APP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010733798.6A CN111949608B (en) 2020-07-27 2020-07-27 Method and device for searching text in APP

Publications (2)

Publication Number Publication Date
CN111949608A true CN111949608A (en) 2020-11-17
CN111949608B CN111949608B (en) 2022-12-23

Family

ID=73339686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010733798.6A Active CN111949608B (en) 2020-07-27 2020-07-27 Method and device for searching text in APP

Country Status (1)

Country Link
CN (1) CN111949608B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030101174A1 (en) * 2001-11-29 2003-05-29 International Business Machines Corporation Facilitating the searching for text of computer programs
CN108595989A (en) * 2018-03-15 2018-09-28 杭州电子科技大学 Mobile APP security protection systems and method under a kind of iOS
CN109492398A (en) * 2018-11-23 2019-03-19 北京梆梆安全科技有限公司 A kind of risk checking method and device of Android application program sensitive behavior
CN111382259A (en) * 2018-12-28 2020-07-07 上海游昆信息技术有限公司 Analysis method and device for APP crash logs

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030101174A1 (en) * 2001-11-29 2003-05-29 International Business Machines Corporation Facilitating the searching for text of computer programs
CN108595989A (en) * 2018-03-15 2018-09-28 杭州电子科技大学 Mobile APP security protection systems and method under a kind of iOS
CN109492398A (en) * 2018-11-23 2019-03-19 北京梆梆安全科技有限公司 A kind of risk checking method and device of Android application program sensitive behavior
CN111382259A (en) * 2018-12-28 2020-07-07 上海游昆信息技术有限公司 Analysis method and device for APP crash logs

Also Published As

Publication number Publication date
CN111949608B (en) 2022-12-23

Similar Documents

Publication Publication Date Title
CN110058856B (en) Page configuration method and device
CN107122297B (en) Method and equipment for generating request message of test interface
CN109299446B (en) Report generation method and device
CN107122296B (en) Method and apparatus for data assertion for test interface
CN107092535B (en) Method and apparatus for data storage of test interface
CN108228443B (en) Web application testing method and device
CN113138757B (en) Front-end code automatic generation method, device, server, system and medium
CN112346884A (en) Message reach data processing method and device
CN111314535A (en) Method and equipment for recording quality inspection process of mobile phone
CN114297204A (en) Data storage and retrieval method and device for heterogeneous data source
CN111949608B (en) Method and device for searching text in APP
CN113868698A (en) File desensitization method and equipment
CN109165193B (en) Log data storage method and device, client and server
CN109828897A (en) chip parameter sending method and device
CN108268369B (en) Test data acquisition method and device
CN111478985A (en) Service domain name basic information dynamic configuration method
CN116643958A (en) Log data processing method and device
CN110753136B (en) Domain name resolution method, device, equipment and storage medium
CN114329495A (en) Endogenous security based asset vulnerability static analysis method and device
CN114064111A (en) Management method and equipment for version information of deployment package
CN117251384B (en) Interface automation test case generation method and system
CN116610679B (en) json data analysis method, json data analysis device, computer equipment and computer medium
CN111381917A (en) Data reading and writing method and device
CN112131193B (en) Application program compression method and device
US11681862B1 (en) System and method for identifying location of content within an electronic document

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230329

Address after: 2800 Wanyuan Road, Minhang District, Shanghai 201103

Patentee after: Shanghai Youkun Information Technology Co.,Ltd.

Address before: 510665 room 901-905, no.12-1, Keyun Road, Tianhe District, Guangzhou City, Guangdong Province (office use only)

Patentee before: Guangzhou Zhangtao Network Technology Co.,Ltd.