CN110032394A - A kind of analysis method, device and the storage medium of passive coding file - Google Patents
A kind of analysis method, device and the storage medium of passive coding file Download PDFInfo
- Publication number
- CN110032394A CN110032394A CN201910293013.5A CN201910293013A CN110032394A CN 110032394 A CN110032394 A CN 110032394A CN 201910293013 A CN201910293013 A CN 201910293013A CN 110032394 A CN110032394 A CN 110032394A
- Authority
- CN
- China
- Prior art keywords
- file
- packet
- file packet
- name
- class
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/74—Reverse engineering; Extracting design information from source code
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Stored Programmes (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses analysis method, device and the storage mediums of a kind of passive coding file;The embodiment of the present invention first obtains initial passive code file, the initial passive code file include the first file packet and by the first file packet call the second file packet, then, static state traverses the first file packet, it obtains and the matched static call relationship of the second file packet, then, when the second file packet traverses the call relation with the static call relationship match, Dynamic injection acquisition instruction is to the second file packet, obtain passive coding file, the acquisition instruction is the code for obtaining function calling relationship, subsequently, run the passive coding file, the first file packet calls the function calling relationship of the second file packet when obtaining operation;The program can effectively improve the accuracy analyzed call relation in passive coding file.
Description
Technical field
The present invention relates to fields of communication technology, and in particular to a kind of analysis method of passive coding file, device and storage are situated between
Matter.
Background technique
The program of each large size is that the functional requirement of entire program is realized by tissue to function and calling.Cause
This, it is known exactly that the call relation in program between function is extremely important.Java source code is by being compiled as class (class) at present
File is wrapped with Java archive (JAR, Java Archive) is packaged into, i.e.,, can be by anti-in passive coding after jar packet
Compiling obtains java source code and analyzes the Java function calling relationship between jar packet class, but can not obtain it is accurate when operation
Function calling relationship.Meanwhile there is the possibility of failure in decompiling, can not analyze the Java source code of generation, influence
Obtain call relation.
Summary of the invention
The embodiment of the present invention provides analysis method, device and the storage medium of a kind of passive coding file, can effectively mention
The accuracy that height analyzes call relation in passive coding file.
The embodiment of the present invention provides a kind of analysis method of passive coding file, comprising:
Initial passive code file is obtained, the initial passive code file includes the first file packet and called by the first file packet
The second file packet;
Static state traverses the first file packet, obtains and the matched static call relationship of the second file packet;
When the second file packet traverses the call relation with the static call relationship match, Dynamic injection is obtained
It instructs to the second file packet, obtains passive coding file, the acquisition instruction is the code for obtaining function calling relationship;
The passive coding file is run, the first file packet calls the function calling relationship of the second file packet when obtaining operation.
Correspondingly, the embodiment of the present invention also provides a kind of analytical equipment of passive coding file, comprising:
Acquiring unit, for obtaining passive coding file to be analyzed, the passive coding file is passive coding file, including the
One file packet and the second file packet called by the first file packet;
Static Traversal Unit traverses the first file packet for static, obtains and the matched static tune of the second file packet
With relationship;
Dynamic injection unit, for when the second file packet traverses static call relationship, Dynamic injection acquisition to refer to
It enables to the second file packet, the acquisition instruction is the code for obtaining function calling relationship;
Running unit obtains first using the acquisition instruction for running the passive coding file for having been injected into acquisition instruction
File packet calls the function calling relationship of the second file packet.
Optionally, in some embodiments, the static Traversal Unit may include the first parsing subunit and first pass
Subelement is gone through, as follows:
First parsing subunit obtains the first syntax tree for parsing the first file packet;
The first traversal subelement, for traversing first syntax tree, with the class packet name that is called in the second file packet
Prefix matched, obtain and the matched static call relationship of the second file packet.
Optionally, in some embodiments, the static call relationship includes the full name of class, the full name of interface and/or function name
Relationship, the first traversal subelement, specifically for by class called in the node of first syntax tree and the second file packet
The prefix of packet name is matched;If being matched to class declaration, the full name of class is obtained;If being matched to interface statement, it is complete to obtain interface
Name;If being matched to function call, the full name of class and function name are obtained, or obtains the full name of interface and function name.
Optionally, in some embodiments, the Dynamic injection unit may include the second parsing subunit and second time
Subelement is gone through, as follows:
Second parsing subunit obtains the second syntax tree for parsing the second file packet;
The second traversal subelement is traversing the static state with the first file packet for traversing second syntax tree
When the matched call relation of call relation, acquisition instruction is injected to the second file packet, obtains passive coding file.
Optionally, in some embodiments, the static call relationship includes the full name of class, the full name of interface and/or function name
Relationship, the second traversal subelement, specifically for obtaining the class name and interface name of the second file packet;Traverse the second file packet
Function name in class name and interface name, when traversing function name matched with the function name of the first file packet, Dynamic injection is obtained
Instruction fetch obtains passive coding file to the second file packet.
Optionally, in some embodiments, the running unit may include monitoring subelement, obtain subelement and determination
Subelement, as follows:
The monitoring subelement, for being supervised by operational process of the acquisition instruction to the passive coding file
Control;
The acquisition subelement, for obtaining the first file packet when monitoring the first file packet the second file packet of calling
Used class name, interface name and/or function name when calling the second file packet;
The determining subelement, for determining first according to the class name of the function call, interface name and/or function name
File packet calls the function calling relationship of the second file packet.
Optionally, in some embodiments, the analytical equipment of the passive coding file can also include:
Generation unit, for generating journal file according to the function calling relationship got.
In addition, the embodiment of the present invention also provides a kind of storage medium, the storage medium is stored with a plurality of instruction, the finger
It enables and being loaded suitable for processor, the step in analysis method to execute any passive coding file provided in an embodiment of the present invention
Suddenly.
The embodiment of the present invention first obtains initial passive code file, the initial passive code file include the first file packet and by
The second file packet that first file packet calls, then, static state traverse the first file packet, obtain matched with the second file packet
Static call relationship then when the second file packet traverses the call relation with the static call relationship match, is moved
State injects acquisition instruction to the second file packet, obtains passive coding file, the acquisition instruction is for obtaining function calling relationship
Code subsequently run the passive coding file, the first file packet calls the function call of the second file packet when obtaining operation
Relationship;The program can effectively improve the accuracy analyzed call relation in passive coding file.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 a is the schematic diagram of a scenario of the analysis method of passive coding file provided in an embodiment of the present invention;
Fig. 1 b is the flow chart of the analysis method of passive coding file provided in an embodiment of the present invention;
Fig. 2 a is another flow chart of the analysis method of passive coding file provided in an embodiment of the present invention;
Fig. 2 b is the flow chart of static traversal provided in an embodiment of the present invention;
Fig. 2 c is the flow chart of Dynamic injection provided in an embodiment of the present invention;
The structural schematic diagram of the analytical equipment of Fig. 3 passive coding file provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those skilled in the art's every other implementation obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
In addition, herein although term " first ", " second " etc. is employed many times describe various elements (or various threshold values or
Various applications or various instructions or various operations) etc., but these elements (or threshold value or application or instruction or operation) should not be by
The limitation of these terms.These terms are only intended to distinguish an element (or threshold value or application or instruction or operation) and another
Element (or threshold value or application or instruction or operation).For example, the first operation can be referred to as the second operation, the second operation can also be with
Referred to as first operation, without departing from the scope of the present invention, the first operation and the second operation are all operations, and only the two is not
Identical operation.
The embodiment of the present invention provides analysis method, device and the storage medium of a kind of passive coding file.Wherein, the passive coding
The analytical equipment of file can integrate in the terminal, wherein the terminal may include tablet computer, laptop and a
People calculates equipment such as (PC, Personal Computer).
For example, by taking the analytical equipment of the passive coding file is integrated in the terminal as an example, referring to Fig. 1 a, firstly, obtaining initial
Passive coding file, the initial passive code file include the first file packet and by the first file packet call the second file packet, then,
Static state traverse the first file packet, obtain with the matched static call relationship of the second file packet, then, in the second file packet time
When going through to call relation with the static call relationship match, Dynamic injection acquisition instruction obtains passive coding to the second file packet
File, the acquisition instruction are the code for obtaining function calling relationship, subsequently, run the passive coding file, obtain operation
When the first file packet call the function calling relationship of the second file packet, and according to the function calling relationship got, generate log
File, can carry out showing at the terminal, etc..
It is described in detail separately below.It should be noted that the following description sequence is not as excellent to embodiment
The restriction of choosing sequence.
The present embodiment will be described from the angle of the analytical equipment of passive coding file, the analytical equipment of the passive coding file
It specifically can integrate in the terminal, wherein the terminal may include that tablet computer, laptop and individual calculus etc. are set
It is standby.
A kind of analysis method of passive coding file, comprising: first obtain initial passive code file, the initial passive code file packet
The the second file packet for including the first file packet and being called by the first file packet, then, static state traverse the first file packet, obtain and the
The matched static call relationship of two file packets then traverses the tune with the static call relationship match in the second file packet
When with relationship, Dynamic injection acquisition instruction obtains passive coding file to the second file packet, which is for obtaining function
The code of call relation subsequently runs the passive coding file, and the first file packet calls the letter of the second file packet when obtaining operation
Number call relation.
As shown in Figure 1 b, the detailed process of the analysis method of the passive coding file can be such that
101, initial passive code file is obtained, the initial passive code file is including the first file packet and by the first file packet tune
Second file packet.
For example, can specifically obtain passive coding file by network, which refers to source code by compiling
After packing, the file of source code can not be seen.Initial passive code file may include multiple file packets or multiple format
File etc., for example, may include the first file packet and the second file packet etc. for being called by the first file packet.Wherein, it obtains just
The mode of beginning passive coding file can there are many kinds of, can also be with for example, can be from the passive coding file after obtaining compiling in network
Passive coding file, etc. after obtaining compiling in various memories.
Wherein, passive coding file refers to the executable file of not source code, executable file (executable
File) refer to be carried out the file of load and execution by operating system.Under different operating system environments, executable program
Presentation mode it is different.Under Microsoft's Window operating system (Microsoft Windows) operating system, executable program can
To be the type files such as .exe .sys or .com.In Java, executable file can be executable Jar packet etc..For example, just
Beginning passive coding file is multiple Jar packets, then the first file packet can be the first Jar packet, and the second file packet can be by the first Jar
Wrap the 2nd Jar packet called.
Wherein, Jar packet be with platform-independent file format, it allows for many files to be combined into a compressed file,
Include class file, extensible markup language (XML, Extensible Markup Language) file etc. after class programming.
Wherein, class file entitled Java class file entirely, mainly makes Java more in terms of platform-neutral and network mobility
It is suitble to network.Its task in terms of platform-neutral is: providing the binary system independently of bottom host platform for java applet
The service of form.
Wherein, obtain initial passive code file mode can there are many kinds of, for example, can from network obtain compiling after
Passive coding file, can also be from passive coding file, etc. after obtaining compiling in memory.
102, static to traverse the first file packet, it obtains and the matched static call relationship of the second file packet.
For example, specifically can parse the first file packet, obtain the first syntax tree, traverse first syntax tree, by this
The node of one syntax tree is matched with the prefix of class packet (package) name that is called in the second file packet, is obtained and the second text
The matched static call relationship of part packet.For example, can by ASM by the class document analysis of passive coding at syntax tree, traversal
The all types calling logic and function call logic of syntax tree obtain static class, interface and function calling relationship.Also
It is that, in order to solve the problems, such as that decompiling Code obtaining class name needs to splice input (import), ASM tool can be used by nothing
The class document analysis of source code is abstract syntax tree, and class visit method can be used with all types of ergodic classes and function tune
With the type used is all the full name of class.Wherein, import is mainly used to import packet in Java.
Wherein, syntax tree (syntax tree) is also referred to as that abstract syntax tree (AST, abstract syntax tree) is
Computer describes the tree of world's truth.In computer science, syntax tree is the tree of the abstract syntax structure of source code
The shape form of expression, in particular to the source code of programming language.Each node on tree indicates one of source code structure.It
Thus grammer is " abstract ", is because grammer here can't represent each details occurred in true grammer.
Wherein, ASM is a Java bytecode manipulation frame.It can be used to dynamic generation class or enhance existing class
Function.ASM can directly generate binary system class file, can also dynamically change before class is loaded into Java Virtual Machine
Class behavior.
Wherein, static call relationship is referred in the case where passive coding file is not run, and traverses all of syntax tree
Type calling logic and function call logic obtain class, interface and function calling relationship.
For example, the static call relationship includes the full name of class, the full name of interface and/or function name relationship, can be taken out by traversal
As the node of syntax tree, matched according to the prefix of called class packet (package) name, if it is Class Type or interface type
Statement, the full name of output class or the full name of interface.If it is function call, the full name of output class or the full name of interface and function name.Namely
" node of first syntax tree is matched with the prefix for the class packet name that is called in the second file packet, is obtained and the second file
Wrap matched static call relationship ", may include:
The node of first syntax tree is matched with the prefix for the class packet name that is called in the second file packet;If being matched to
Class declaration then obtains the full name of class;If being matched to interface statement, the full name of interface is obtained;If being matched to function call, class is obtained
Full name and function name, or obtain the full name of interface and function name.
Wherein, the full name of class refers to packet name class name, and the full name of interface refers to packet name interface name.
103, when the second file packet traverses the call relation with the static call relationship match, Dynamic injection is obtained
It instructs to the second file packet, obtains passive coding file, which is the code for obtaining function calling relationship.
For example, specifically can parse the second file packet, the second syntax tree is obtained, second syntax tree is traversed, is traversing
When with the call relation of the static call relationship match of the first file packet, acquisition instruction is injected to the second file packet, is obtained passive
Code file.For example, the class name, interface name and the function name that are obtained by the static traversal in step 102, the class that static state traversal obtains
Part is that base class or interface can just get actual function calling relationship when base class or interface call function at runtime.
Therefore, in order to reduce injection rate, reach accurate Dynamic injection, guarantee efficiency and stability when dynamic operation, ASM can be used
The syntax tree for parsing second all classes of file packet is matched to from the class on the inheritance link road obtained in static traversal in syntax tree
Full name and the full name of function, the code of injection energy output function call relation.It is, carrying out dynamic to called jar or class
When injection, realized into the class class for inheriting the calling class that static traversal obtains or the interface that the static traversal of realization obtains
Function entrance Dynamic injection obtains the code of function calling relationship, the class file after the completion of Dynamic injection is saved, by second
File packet is repacked, and the passive coding file of rear second file packet is obtained comprising the first file packet and repack.Then " traversal should
Second syntax tree, when traversing the call relation with the static call relationship match of the first file packet, Dynamic injection acquisition refers to
Enable to the second file packet, obtain passive coding file ", may include:
Obtain the class name and interface name of the second file packet;The function name in the class name and interface name of the second file packet is traversed,
When traversing function name matched with the function name of the first file packet, acquisition instruction is injected to the second file packet, is obtained passive
Code file.
Wherein, call relation refers to traversing and the static call relationship match of the first file packet in the second file packet
Class, interface and functional relation, for example, inheriting calling class or realize the interface that static traversal obtains that static traversal obtains
Class class, etc..Function calling relationship refers to that the first file packet calls the second actual call relation of file packet when operation.
For example, the first file packet is A.jar, the second file packet is B.jar, has abstract class B1, class B2 in B.jar,
class B3.B3 inherits B2, and B2 inherits B1, there is function funcB.If code is B1=new B3 () in A.jar,
B1.funcB.Static analysis only acquisition A.jar calling B1.funcB, that is, static call relationship, and tune when actual motion
It is B3.funcB (), that is, actual call relation, i.e. function calling relationship.
Wherein, Dynamic injection refers under the premise of not modifying source code, to third-party JAVA program in injecting codes
The method of logic.
104, the passive coding file is run, the first file packet calls the function call of the second file packet to close when obtaining operation
System.
For example, can be specifically monitored by operational process of the acquisition instruction to the passive coding file, monitoring
When first file packet calls the second file packet, obtain used class name when the first file packet calls the second file packet, interface name and/
Or function name;According to the class name of the function call, interface name and/or function name, determine that the first file packet calls the second file packet
Function calling relationship.For example, the executable program (i.e. passive coding file) comprising the first file packet and the second file packet is transported
Row gets up, and runs to the function that the first file packet calls the second file packet, will export the first file packet and call the second file packet
Function calling relationship.In the function calling relationship for getting operation, it is output to journal file.That is, can also include: basis
The function calling relationship got generates journal file.
Wherein, journal file is the record file or file set for recording system operatio event, can be divided into event day
Will and message logging.With important function such as the activities for handling the tracking of historical data, diagnosis problem and understanding system.It is counting
In calculation machine, journal file is recorded on the event occurred in operating system or other software operation or uses in the difference of communication software
The file of message between family.
When needing to handle a large amount of passive coding files, in order to promote the efficiency of static traversal and Dynamic injection, analysis is reduced
Workload solves the problems, such as that decompiling mode batch processing script exploitation complexity height and ease for use are low, can be criticized by writing
Amount processing script, completes to carry out batch static analysis and batch Dynamic injection for a large amount of passive coding files.
From the foregoing, it will be observed that the embodiment of the present invention first obtains initial passive code file, which includes the first text
Part packet and the second file packet called by the first file packet, then, static state traverses the first file packet, obtains and the second file packet
Matched static call relationship, then, when the second file packet traverses the call relation with the static call relationship match,
Dynamic injection acquisition instruction obtains passive coding file to the second file packet, which is for obtaining function calling relationship
Code subsequently run the passive coding file, the first file packet calls the function call of the second file packet to close when obtaining operation
System;Static call relationship is obtained since the program can first pass through static traversal, static traversal is relied on and obtains static call relationship
Accurate Dynamic injection reduces Dynamic injection amount to obtain function calling relationship when operation, reduces to original program operational efficiency
With the influence of stability, and effectively improve in passive coding file call relation analyze accuracy.
According to method described in upper one embodiment, citing is described in further detail below.
In the present embodiment, it will be specifically integrated in terminal with the analytical equipment of the passive coding file, passive coding file is specific
It is that Java source code does not have the file of source code after being compiled as class file and being packaged into jar packet, specifically utilizes ASM word
Section code operation framework is illustrated for realizing passive coding file analysis.
As shown in Figure 2 a, a kind of analysis method of passive coding file, detailed process can be such that
201, terminal obtains initial passive code file, and the initial passive code file is including the first Jar packet and by the first Jar packet
The 2nd Jar packet called.
For example, can specifically obtain initial passive code file from network.Wherein, which may include
First Jar packet and the 2nd Jar packet etc. called by the first Jar packet.
202, terminal traverses the first Jar packet using ASM static state, obtains and the matched static call relationship of the 2nd Jar packet.
For example, terminal can by ASM by class document analysis in the first Jar packet at syntax tree, traverse syntax tree
All types calling logic and function call logic obtain static class, interface and function calling relationship.It is, to understand
Decompiling Code obtaining class name of having determined needs the problem of splicing import, and class file of the ASM tool by passive coding can be used
Abstract syntax tree is resolved to, class visit method can be used with all types of ergodic classes and function call, the type used are all
The full name of class.By the node of ergodic abstract syntax tree, matched according to the prefix of called class packet name, if it is Class Type or
Interface type statement, the full name of output class or the full name of interface.If it is function call, the full name of output class or the full name of interface and function
Name.For example, the flow chart of static traversal can be as shown in Figure 2 b, derived class adapter " ClassAdapter " in ASM tool
With derived class function adaptation " MethodAdapter ", rewrites all methods of base class and then match the method for rewriting
Verifying, if the 2nd Jar packet of matching, if matching, exports class name, interface name and/or the function name of calling.Terminal can will be quiet
Class name, interface name and the function name that state traversal obtains save in memory.
Wherein, ClassAdapter class realizes class access " ClassVisitor " interface, it is by the method call to it
Entrust to another class visitor " ClassVisitor " object.MethodAdapter class realizes class function visitor
" MethodVisitor " interface strictly defines the visit of each class access " visitXXX " in MethodVisitor interface
Ask sequence.Rewriting is that subclass rewrites the realization process for allowing the method accessed of parent, and return value and parameter are all
It cannot change.I.e. shell is constant, and core is rewritten.
Wherein, the partial code of the ASM syntax tree of class can be such that
Wherein, rewriteeing the methodical partial code of ClassAdapter class institute can be such that
Wherein, rewriteeing the methodical partial code of MethodAdapter class institute can be such that
203, terminal parses the 2nd Jar packet using ASM, obtains the second syntax tree.
For example, terminal can parse all classes in the 2nd Jar packet by ASM, the second syntax tree is obtained, and traverse
Second syntax tree.
204, terminal is when the second syntax tree traverses the call relation with the static call relationship match of the first Jar packet,
Acquisition instruction is injected to the 2nd Jar packet, obtains passive coding file.
For example, reaching accurate Dynamic injection to reduce injection rate, guarantee efficiency and stability when dynamic operation, it can
Be matched in syntax tree from the inheritance link road obtained in static traversal the full name of class and the full name of function, injection can export letter
The code of number call relation.It is, traversing acquisition to static state is inherited when carrying out Dynamic injection to called jar or class
The function entrance Dynamic injection realized in the class class for the interface for calling class or the static traversal of realization to obtain obtains function call
Class file after the completion of Dynamic injection is saved, the 2nd Jar packet is repacked by the code of relationship, is obtained comprising first
Jar packet and the passive coding file for repacking rear 2nd Jar packet.For example, traversing the 2nd Jar packet class abstract syntax tree by ASM
When, whether the class of the Similar integral and realization that judge traversal has the class name of static traversal acquisition, interface name, if fruit is that succession is static
It traverses the class obtained or realizes the interface that static traversal obtains, and when method name text matches are consistent, in function entrance
(MethodEnter) Dynamic injection obtains the code of function calling relationship.
Wherein, the interface code of the class and realization that obtain succession can be such that
For example, the flow chart of Dynamic injection can be as shown in Figure 2 c, the derived class adapter in ASM tool
" ClassAdapter " rewrites access function " visitMethod " method, and inherits notice adapter
" AdviceAdapter " rewrites injection function entrance " onMethodEnter " method to obtain call relation, then, reads quiet
Class, interface and the function that state traversal obtains, obtain the parent name of the 2nd Jar packet and the interface name of realization, then traverse the 2nd Jar packet
Class and interface in function name, when traversing function name matched with the function name of the first Jar packet, Dynamic injection obtain adjust
Acquisition instruction class (class) file of injection is saved, to the 2nd Jar to the 2nd Jar packet with the code of relationship, i.e. acquisition instruction
Packet is repacked, and the passive coding file of rear 2nd Jar packet is obtained comprising the first Jar packet and repack.
205, terminal operating passive coding file, the first Jar packet calls the function call of the 2nd Jar packet to close when obtaining operation
System.
For example, can be specifically monitored by operational process of the acquisition instruction to the passive coding file, monitoring
When first Jar packet calls the 2nd Jar packet, used class name, interface name and/or letter when the first Jar packet the 2nd Jar packet of calling are obtained
It is several;According to the class name of the function call, interface name and/or function name, determine that the first Jar packet calls the function of the 2nd Jar packet
Call relation.For example, the executable program (i.e. passive coding file) comprising the first Jar packet and the 2nd Jar packet is behaved, transport
Row calls the function of the 2nd Jar packet to the first Jar packet, will export the first Jar packet and the function call of the 2nd Jar packet is called to close
System.For example, the passive coding file of class file is injected in operation as shown in Figure 2 c, operation call relation is then obtained.
206, terminal generates journal file according to the function calling relationship got.
For example, terminal specifically can be output to journal file, in terminal in the function calling relationship for getting operation
On can check the first Jar packet call the 2nd Jar packet function calling relationship.
It is that core function is completed by ASM ergodic classes abstract syntax tree due to static state traversal and accurate Dynamic injection.For
The efficiency for promoting static traversal and Dynamic injection reduces analysis workload, solves the exploitation of decompiling mode batch processing script
Complexity height and the low problem of ease for use can be by writing generation when needing to handle a large amount of jar packets and class class file
Code writes batch processing script and completes to carry out batch static analysis and batch Dynamic injection for a large amount of jar packets and file.
From the foregoing, it will be observed that the embodiment of the present invention first obtains initial passive code file, which includes the first text
Part packet and the second file packet called by the first file packet, then, static state traverses the first file packet, obtains and the second file packet
Matched static call relationship, then, when the second file packet traverses the call relation with the static call relationship match,
Dynamic injection acquisition instruction obtains passive coding file to the second file packet, which is for obtaining function calling relationship
Code subsequently run the passive coding file, the first file packet calls the function call of the second file packet to close when obtaining operation
System;Static call relationship is obtained since the program can first pass through static traversal, static traversal is relied on and obtains static call relationship
Accurate Dynamic injection, and repack operation, when the function of run time call to Dynamic injection, injecting codes will output operation when
Call relation, relative to by decompiling obtain source code post analysis call relation scheme for, this programme can obtain
Class function call relation when more accurately running effectively improves the accuracy analyzed call relation in passive coding file,
And the class and function based on static analysis executes and precisely injects the Dynamic injection amount that can reduce, and guarantees efficiency when dynamic operation
And stability, static analysis and Dynamic injection mode are promoted static time convenient for writing code and a large amount of jar packets of script batch processing
It goes through the efficiency with Dynamic injection, reduces analysis workload, solve decompiling mode batch processing script exploitation complexity height and easily
With the low problem of property.
In order to better implement above method, the embodiment of the present invention also provides a kind of analytical equipment of passive coding file, such as
Shown in Fig. 3, the analytical equipment of the passive coding file may include acquiring unit 301, static Traversal Unit 302, Dynamic injection list
Member 303 and running unit 304 are as follows:
(1) acquiring unit 301;
Acquiring unit 301, for obtaining initial passive code file, the initial passive code file include the first file packet and by
The second file packet that first file packet calls.
For example, acquiring unit 301, can specifically obtain passive coding file by network, which is source code
After compiling and packing, the file of source code can not be seen.Initial passive code file may include multiple file packets, for example,
The the second file packet that may include the first file packet and called by the first file packet.Wherein, the side of initial passive code file is obtained
Formula can there are many kinds of, for example, can from network obtain compiling after passive coding file, can also be obtained from various memories
Passive coding file, etc. after taking compiling.
(2) static Traversal Unit 302;
Static Traversal Unit 302 traverses the first file packet for static, obtains and the matched static tune of the second file packet
With relationship.
For example, static Traversal Unit 302, specifically can by ASM by the class document analysis of passive coding at grammer
Tree, traverses all types calling logic and function call logic of syntax tree, obtains static class, interface and function call and closes
System.It is, ASM tool can be used will in order to solve the problems, such as that decompiling Code obtaining class name needs to splice import
The class document analysis of passive coding is abstract syntax tree, and class visit method can be used with all types of ergodic classes and function tune
With the type used is all the full name of class.Wherein, import is mainly used to import packet in Java.
Optionally, in some embodiments, static Traversal Unit may include the first parsing subunit and the first traversal
Unit, as follows:
First parsing subunit obtains the first syntax tree for parsing the first file packet;
First traversal subelement, the prefix for traversing first syntax tree, with the class packet name that is called in the second file packet
It is matched, is obtained and the matched static call relationship of the second file packet.
Optionally, in some embodiments, static call relationship includes the full name of class, the full name of interface and/or function name relationship,
The first traversal subelement, specifically for by the prefix of class packet name called in the node of first syntax tree and the second file packet
It is matched;If being matched to class declaration, the full name of class is obtained;If being matched to interface statement, the full name of interface is obtained;If being matched to
Function call then obtains the full name of class and function name, or obtains the full name of interface and function name.
For example, the first traversal subelement, it specifically can be by the node of ergodic abstract syntax tree, according to called class
Package prefixes are matched, and are stated if it is Class Type or interface type, the full name of output class or the full name of interface.If
It is function call, the full name of output class or the full name of interface and function name.
(3) Dynamic injection unit 303;
Dynamic injection unit 303, for when the second file packet traverses static call relationship, Dynamic injection acquisition to refer to
It enables to the second file packet, which is the code for obtaining function calling relationship.
For example, Dynamic injection unit 303, specifically can be used the syntax tree that ASM parses second all classes of file packet, in language
The full name of class and the full name of function of the inheritance link road obtained from static traversal are matched in method tree, injection can output function calling
The code of relationship.It is, when carrying out Dynamic injection to called jar or class, to the calling class for inheriting static traversal acquisition
Or the function entrance Dynamic injection realized in the class class of the interface of the static traversal acquisition of realization obtains function calling relationship
Class file after the completion of Dynamic injection is saved, the second file packet is repacked by code, is obtained comprising the first file packet
With the passive coding file for repacking rear second file packet.
Optionally, in some embodiments, Dynamic injection unit may include the second parsing subunit and the second traversal
Unit, as follows:
Second parsing subunit obtains the second syntax tree for parsing the second file packet;
Second traversal subelement is closed traversing with the static call of the first file packet for traversing second syntax tree
When being matched call relation, acquisition instruction is injected to the second file packet, obtains passive coding file.
Optionally, in some embodiments, static call relationship includes the full name of class, the full name of interface and/or function name relationship,
The second traversal subelement, specifically for obtaining the class name and interface name of the second file packet;Traverse the second file packet class name and
Function name in interface name, when traversing function name matched with the function name of the first file packet, Dynamic injection acquisition instruction
To the second file packet, passive coding file is obtained.
(4) running unit 304;
Running unit 304 obtains first using the acquisition instruction for running the passive coding file for having been injected into acquisition instruction
File packet calls the function calling relationship of the second file packet.
Optionally, in some embodiments, running unit may include monitoring subelement, obtain subelement and determine that son is single
Member is as follows:
Subelement is monitored, for being monitored by operational process of the acquisition instruction to the passive coding file;
Subelement is obtained, for the first file packet being obtained and being called when monitoring the first file packet the second file packet of calling
Used class name, interface name and/or function name when the second file packet;
Subelement is determined, for determining the first file packet according to the class name of the function call, interface name and/or function name
Call the function calling relationship of the second file packet.
Optionally, in some embodiments, the analytical equipment of the passive coding file can also include generation unit, as follows:
Generation unit, for generating journal file according to the function calling relationship got.
In order to promote the efficiency of static traversal and Dynamic injection, analysis workload is reduced, is solved at decompiling mode batch
Script exploitation complexity height and the low problem of ease for use are managed, it, can be by writing batch when needing to handle a large amount of passive coding files
Amount processing script, completes to carry out batch static analysis and batch Dynamic injection for a large amount of passive coding files.
When it is implemented, above each unit can be used as independent entity to realize, any combination can also be carried out, is made
It is realized for same or several entities, the specific implementation of above each unit can be found in the embodiment of the method for front, herein not
It repeats again.
From the foregoing, it will be observed that the embodiment of the present invention first obtains initial passive code file by acquiring unit 301, the initial passive code text
Part includes the first file packet and then the second file packet for being called by the first file packet is traversed by static Traversal Unit 302 is static
The first file packet, obtain with the matched static call relationship of the second file packet, then, by Dynamic injection unit 303 this
When two file packets traverse the call relation with the static call relationship match, Dynamic injection acquisition instruction to the second file packet,
Passive coding file is obtained, which is that the code for obtaining function calling relationship is subsequently transported by running unit 304
The row passive coding file, the first file packet calls the function calling relationship of the second file packet when obtaining operation;Since the program can
Static call relationship is obtained to first pass through static traversal, static traversal is relied on and obtains the accurate Dynamic injection of static call relationship, with
Function calling relationship when operation is obtained, Dynamic injection amount is reduced, reduces the influence to original program operational efficiency and stability,
And effectively improve the accuracy analyzed call relation in passive coding file.
Correspondingly, the embodiment of the present invention also provides a kind of terminal, as shown in figure 4, the terminal may include radio frequency (RF,
Radio Frequency) circuit 401, the memory 402, defeated that includes one or more computer readable storage medium
Enter unit 403, display unit 404, sensor 405, voicefrequency circuit 406, Wireless Fidelity (WiFi, Wireless Fidelity)
The components such as module 407, the processor 408 for including one or more than one processing core and power supply 409.This field skill
Art personnel are appreciated that the restriction of the not structure paired terminal of terminal structure shown in Fig. 4, may include more or more than illustrating
Few component perhaps combines certain components or different component layouts.Wherein:
RF circuit 401 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station
After downlink information receives, one or the processing of more than one processor 408 are transferred to;In addition, the data for being related to uplink are sent to
Base station.In general, RF circuit 401 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, uses
Family identity module (SIM, Subscriber Identity Module) card, transceiver, coupler, low-noise amplifier
(LNA, Low Noise Amplifier), duplexer etc..In addition, RF circuit 401 can also by wireless communication with network and its
He communicates equipment.Any communication standard or agreement, including but not limited to global system for mobile telecommunications system can be used in the wireless communication
Unite (GSM, Global System of Mobile communication), general packet radio service (GPRS, General
Packet Radio Service), CDMA (CDMA, Code Division Multiple Access), wideband code division it is more
Location (WCDMA, Wideband Code Division Multiple Access), long term evolution (LTE, Long Term
Evolution), Email, short message service (SMS, Short Messaging Service) etc..
Memory 402 can be used for storing software program and module, and processor 408 is stored in memory 402 by operation
Software program and module, thereby executing various function application and data processing.Memory 402 can mainly include storage journey
Sequence area and storage data area, wherein storing program area can the (ratio of application program needed for storage program area, at least one function
Such as sound-playing function, image player function) etc.;Storage data area, which can be stored, uses created data according to terminal
(such as audio data, phone directory etc.) etc..In addition, memory 402 may include high-speed random access memory, can also include
Nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-state parts.Phase
Ying Di, memory 402 can also include Memory Controller, to provide processor 408 and input unit 403 to memory 402
Access.
Input unit 403 can be used for receiving the number or character information of input, and generate and user setting and function
Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, in a specific embodiment
In, input unit 403 may include touch sensitive surface and other input equipments.Touch sensitive surface, also referred to as touch display screen or touching
Control plate, collect user on it or nearby touch operation (such as user using any suitable object such as finger, stylus or
Operation of the attachment on touch sensitive surface or near touch sensitive surface), and corresponding connection dress is driven according to preset formula
It sets.Optionally, touch sensitive surface may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus is examined
The touch orientation of user is surveyed, and detects touch operation bring signal, transmits a signal to touch controller;Touch controller from
Touch information is received on touch detecting apparatus, and is converted into contact coordinate, then gives processor 408, and can reception processing
Order that device 408 is sent simultaneously is executed.Furthermore, it is possible to a variety of using resistance-type, condenser type, infrared ray and surface acoustic wave etc.
Type realizes touch sensitive surface.In addition to touch sensitive surface, input unit 403 can also include other input equipments.Specifically, other are defeated
Entering equipment can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse
One of mark, operating stick etc. are a variety of.
Display unit 404 can be used for showing information input by user or be supplied to user information and terminal it is various
Graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof.Display
Unit 404 may include display panel, optionally, can using liquid crystal display (LCD, Liquid Crystal Display),
The forms such as Organic Light Emitting Diode (OLED, Organic Light-Emitting Diode) configure display panel.Further
, touch sensitive surface can cover display panel, after touch sensitive surface detects touch operation on it or nearby, send processing to
Device 408 is followed by subsequent processing device 408 and is provided on a display panel accordingly according to the type of touch event to determine the type of touch event
Visual output.Although touch sensitive surface and display panel are to realize input and input as two independent components in Fig. 4
Function, but in some embodiments it is possible to touch sensitive surface and display panel are integrated and realizes and outputs and inputs function.
Terminal may also include at least one sensor 405, such as optical sensor, motion sensor and other sensors.
Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to ambient light
Light and shade adjust the brightness of display panel, proximity sensor can close display panel and/or back when terminal is moved in one's ear
Light.As a kind of motion sensor, gravity accelerometer can detect (generally three axis) acceleration in all directions
Size can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (such as horizontal/vertical screen switching,
Dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;It can also configure as terminal
The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, details are not described herein.
Voicefrequency circuit 406, loudspeaker, microphone can provide the audio interface between user and terminal.Voicefrequency circuit 406 can
By the electric signal after the audio data received conversion, it is transferred to loudspeaker, voice signal output is converted to by loudspeaker;It is another
The voice signal of collection is converted to electric signal by aspect, microphone, is converted to audio data after being received by voicefrequency circuit 406, then
After the processing of audio data output processor 408, it is sent to such as another terminal through RF circuit 401, or by audio data
Output is further processed to memory 402.Voicefrequency circuit 406 is also possible that earphone jack, with provide peripheral hardware earphone with
The communication of terminal.
WiFi belongs to short range wireless transmission technology, and terminal can help user's transceiver electronics postal by WiFi module 407
Part, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 4 is shown
WiFi module 407, but it is understood that, and it is not belonging to must be configured into for terminal, it can according to need do not changing completely
Become in the range of the essence of invention and omits.
Processor 408 is the control centre of terminal, using the various pieces of various interfaces and connection whole mobile phone, is led to
It crosses operation or executes the software program and/or module being stored in memory 402, and call and be stored in memory 402
Data execute the various functions and processing data of terminal, to carry out integral monitoring to mobile phone.Optionally, processor 408 can wrap
Include one or more processing cores;Preferably, processor 408 can integrate application processor and modem processor, wherein answer
With the main processing operation system of processor, user interface and application program etc., modem processor mainly handles wireless communication.
It is understood that above-mentioned modem processor can not also be integrated into processor 408.
Terminal further includes the power supply 409 (such as battery) powered to all parts, it is preferred that power supply can pass through power supply pipe
Reason system and processor 408 are logically contiguous, to realize management charging, electric discharge and power managed by power-supply management system
Etc. functions.Power supply 409 can also include one or more direct current or AC power source, recharging system, power failure inspection
The random components such as slowdown monitoring circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal can also include camera, bluetooth module etc., and details are not described herein.Specifically in this implementation
In example, the processor 408 in terminal can be corresponding by the process of one or more application program according to following instruction
Executable file is loaded into memory 402, and the application program being stored in memory 402 is run by processor 408, from
And realize various functions:
Initial passive code file is obtained, which includes the first file packet and called by the first file packet
Second file packet, then, static state traverse the first file packet, obtain with the matched static call relationship of the second file packet, then,
When the second file packet traverses the call relation with the static call relationship match, Dynamic injection acquisition instruction to the second text
Part packet obtains passive coding file, which is that it is passive subsequently to run this for the code for obtaining function calling relationship
Code file, the first file packet calls the function calling relationship of the second file packet when obtaining operation.
The specific implementation of above each operation can be found in the embodiment of front, and details are not described herein.
From the foregoing, it will be observed that the embodiment of the present invention first obtains initial passive code file, the initial passive code file includes first
File packet and the second file packet called by the first file packet, then, static state traverses the first file packet, obtains and the second text
The matched static call relationship of part packet then traverses the tune with the static call relationship match in the second file packet
When with relationship, Dynamic injection acquisition instruction to the second file packet obtains passive coding file, and the acquisition instruction is for obtaining letter
The code of number call relation subsequently runs the passive coding file, and the first file packet calls the second file packet when obtaining operation
Function calling relationship;Static call relationship is obtained since the program can first pass through static traversal, static traversal is relied on and obtains
The accurate Dynamic injection of static call relationship reduces Dynamic injection amount to obtain function calling relationship when operation, reduces to original
The influence of program operational efficiency and stability, and effectively improve the accuracy analyzed call relation in passive coding file.
It will appreciated by the skilled person that all or part of the steps in the various methods of above-described embodiment can be with
It is completed by instructing, or relevant hardware is controlled by instruction to complete, which can store computer-readable deposits in one
In storage media, and is loaded and executed by processor.
For this purpose, the embodiment of the present invention also provides a kind of storage medium, wherein being stored with a plurality of instruction, which can be located
Reason device is loaded, to execute the step in the analysis method of any passive coding file provided by the embodiment of the present invention.Example
Such as, which can execute following steps:
Initial passive code file is obtained, which includes the first file packet and called by the first file packet
Second file packet, then, static state traverse the first file packet, obtain with the matched static call relationship of the second file packet, then,
When the second file packet traverses the call relation with the static call relationship match, Dynamic injection acquisition instruction to the second text
Part packet obtains passive coding file, which is that it is passive subsequently to run this for the code for obtaining function calling relationship
Code file, the first file packet calls the function calling relationship of the second file packet when obtaining operation.
The specific implementation of above each operation can be found in the embodiment of front, and details are not described herein.
Wherein, which may include: read-only memory (Read Only Memory, ROM), random access memory
Body (Random Access Memory, RAM), disk or CD etc..
By the instruction stored in the storage medium, any passive coding provided by the embodiment of the present invention can be executed
Step in the analysis method of file, it is thereby achieved that point of any passive coding file provided by the embodiment of the present invention
Beneficial effect achieved by analysis method is detailed in the embodiment of front, and details are not described herein.
Analysis method, device and the storage medium for being provided for the embodiments of the invention a kind of passive coding file above carry out
It is discussed in detail, used herein a specific example illustrates the principle and implementation of the invention, above embodiments
Explanation be merely used to help understand method and its core concept of the invention;Meanwhile for those skilled in the art, foundation
Thought of the invention, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification is not
It is interpreted as limitation of the present invention.
Claims (10)
1. a kind of analysis method of passive coding file characterized by comprising
Obtain initial passive code file, the initial passive code file include the first file packet and called by the first file packet the
Two file packets;
Static state traverses the first file packet, obtains and the matched static call relationship of the second file packet;
When the second file packet traverses the call relation with the static call relationship match, Dynamic injection acquisition instruction
To the second file packet, passive coding file is obtained, the acquisition instruction is the code for obtaining function calling relationship;
The passive coding file is run, the first file packet calls the function calling relationship of the second file packet when obtaining operation.
2. the method according to claim 1, wherein it is described it is static traverse the first file packet, obtain and the
The matched static call relationship of two file packets, comprising:
The first file packet is parsed, the first syntax tree is obtained;
First syntax tree is traversed, by the prefix for the class packet name that is called in the node of first syntax tree and the second file packet
It is matched, is obtained and the matched static call relationship of the second file packet.
3. according to the method described in claim 2, it is characterized in that, the static call relationship includes the full name of class, the full name of interface
And/or function name relationship, it is described by the node of first syntax tree and the second file packet be called class packet name prefix into
Row matching, obtains and the matched static call relationship of the second file packet, comprising:
The node of first syntax tree is matched with the prefix for the class packet name that is called in the second file packet;
If being matched to class declaration, the full name of class is obtained;
If being matched to interface statement, the full name of interface is obtained;
If being matched to function call, the full name of class and function name are obtained, or obtains the full name of interface and function name.
4. the method according to claim 1, wherein described traverse and the static state in the second file packet
When the matched call relation of call relation, Dynamic injection acquisition instruction obtains passive coding file to the second file packet, comprising:
The second file packet is parsed, the second syntax tree is obtained;
Second syntax tree is traversed, when traversing the call relation with the static call relationship match of the first file packet, note
Enter acquisition instruction to the second file packet, obtains passive coding file.
5. according to the method described in claim 4, it is characterized in that, the static call relationship includes the full name of class, the full name of interface
And/or function name relationship, traversal second syntax tree are traversing the static call relationship match with the first file packet
Call relation when, Dynamic injection acquisition instruction obtains passive coding file to the second file packet, comprising:
Obtain the class name and interface name of the second file packet;
The function name in the class name and interface name of the second file packet is traversed, it is matched with the function name of the first file packet traversing
When function name, Dynamic injection acquisition instruction obtains passive coding file to the second file packet.
6. method according to any one of claims 1 to 5, which is characterized in that the first file packet calls when the acquisition is run
The function calling relationship of second file packet, comprising:
It is monitored by operational process of the acquisition instruction to the passive coding file;
When monitoring the first file packet the second file packet of calling, used class when the first file packet the second file packet of calling is obtained
Name, interface name and/or function name;
According to the class name of the function call, interface name and/or function name, determine that the first file packet calls the letter of the second file packet
Number call relation.
7. method according to any one of claims 1 to 5, which is characterized in that the operation passive coding file obtains fortune
When row after the function calling relationship of the second file packet of the first file packet calling, further includes:
According to the function calling relationship got, journal file is generated.
8. a kind of analytical equipment of passive coding file characterized by comprising
Acquiring unit, for obtaining passive coding file to be analyzed, the passive coding file is passive coding file, including the first text
Part packet and the second file packet called by the first file packet;
Static Traversal Unit traverses the first file packet for static, obtains closing with the matched static call of the second file packet
System;
Dynamic injection unit, for when the second file packet traverses static call relationship, Dynamic injection acquisition instruction to be arrived
Second file packet, the acquisition instruction are the code for obtaining function calling relationship;
Running unit obtains the first file using the acquisition instruction for running the passive coding file for having been injected into acquisition instruction
Packet calls the function calling relationship of the second file packet.
9. device according to claim 8, which is characterized in that further include:
Generation unit, for generating journal file according to the function calling relationship got.
10. a kind of storage medium, which is characterized in that the storage medium is stored with a plurality of instruction, and described instruction is suitable for processor
It is loaded, the step in the analysis method of 1 to 7 described in any item passive coding files is required with perform claim.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910293013.5A CN110032394B (en) | 2019-04-12 | 2019-04-12 | Analysis method and device for passive code file and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910293013.5A CN110032394B (en) | 2019-04-12 | 2019-04-12 | Analysis method and device for passive code file and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110032394A true CN110032394A (en) | 2019-07-19 |
CN110032394B CN110032394B (en) | 2022-05-31 |
Family
ID=67238154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910293013.5A Active CN110032394B (en) | 2019-04-12 | 2019-04-12 | Analysis method and device for passive code file and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110032394B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113110842A (en) * | 2020-07-08 | 2021-07-13 | 马森 | Software bytecode homology analysis method, device and equipment |
CN114879962A (en) * | 2021-02-05 | 2022-08-09 | 华为技术有限公司 | Method and device for realizing batch system call |
Citations (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080276231A1 (en) * | 2007-05-03 | 2008-11-06 | Yunwu Huang | Method and apparatus for dependency injection by static code generation |
US20100199259A1 (en) * | 2009-01-30 | 2010-08-05 | Quinn Timothy J | Methods and Apparatus for Dynamic Class Reloading and Versioning |
CN101968766A (en) * | 2010-10-21 | 2011-02-09 | 上海交通大学 | System for detecting software bug triggered during practical running of computer program |
US20120284792A1 (en) * | 2009-10-08 | 2012-11-08 | Irdeto Canada Corporation | System and Method for Aggressive Self-Modification in Dynamic Function Call Systems |
CN102880493A (en) * | 2012-09-25 | 2013-01-16 | 南京大学 | Method for automatically analyzing dynamic dependency relationship between members |
CN103365774A (en) * | 2013-08-22 | 2013-10-23 | 北京航空航天大学 | Transient error detection method based on function call relationship |
US20140059525A1 (en) * | 2012-08-24 | 2014-02-27 | Vmware, Inc. | Method and system for facilitating replacement of system calls |
US20140059527A1 (en) * | 2012-08-24 | 2014-02-27 | Ca, Inc. | Injection of updated classes for a java agent |
US20140109068A1 (en) * | 2010-12-06 | 2014-04-17 | Flexycore | Method for compiling an intermediate code of an application |
US20140173571A1 (en) * | 2012-12-14 | 2014-06-19 | Salesforce.Com, Inc. | System and method for dynamic analysis bytecode injection for application dataflow |
US20140344792A1 (en) * | 2013-05-16 | 2014-11-20 | Sap Ag | Dynamic bytecode modification of classes and class hierarchies |
CN104346148A (en) * | 2013-07-30 | 2015-02-11 | 阿里巴巴集团控股有限公司 | Method, device and system for acquiring program performance consumption information |
US20150135167A1 (en) * | 2013-11-14 | 2015-05-14 | Red Hat, Inc. | Dynamic per-method probing during runtime |
US20150143339A1 (en) * | 2013-11-19 | 2015-05-21 | Google Inc. | Callpath finder |
CN104657258A (en) * | 2013-11-21 | 2015-05-27 | 腾讯科技(深圳)有限公司 | Method and device for injecting Java bit codes into target process |
US9223554B1 (en) * | 2012-04-12 | 2015-12-29 | SourceDNA, Inc. | Recovering source code structure from program binaries |
CN105677311A (en) * | 2014-11-21 | 2016-06-15 | 卓望数码技术(深圳)有限公司 | Identification method and device for function call relationships |
CN106547520A (en) * | 2015-09-16 | 2017-03-29 | 腾讯科技(深圳)有限公司 | A kind of code path analysis method and device |
WO2017087801A1 (en) * | 2015-11-20 | 2017-05-26 | Google Inc. | Dynamic update of an application in compilation and deployment |
CN107092488A (en) * | 2017-03-31 | 2017-08-25 | 武汉斗鱼网络科技有限公司 | It is a kind of that application is carried out to bury realization method and system a little without intrusionization |
CN107729015A (en) * | 2017-09-12 | 2018-02-23 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus for determining the useless function in engineering code |
US20180121181A1 (en) * | 2015-06-11 | 2018-05-03 | Line Corporation | Binary merging device, method, and computer program |
CN108021411A (en) * | 2017-12-06 | 2018-05-11 | 国网江苏省电力有限公司电力科学研究院 | A kind of discovery system of calling service relation and discovery method |
CN108153530A (en) * | 2017-12-26 | 2018-06-12 | 网易(杭州)网络有限公司 | Optimization method, device, storage medium, processor and the terminal of bytecode |
CN108874470A (en) * | 2017-05-11 | 2018-11-23 | 腾讯科技(深圳)有限公司 | A kind of information processing method and server, computer storage medium |
KR20180129623A (en) * | 2017-05-26 | 2018-12-05 | 충남대학교산학협력단 | Apparatus for statically analyzing assembly code including assoxiated multi files |
CN109445880A (en) * | 2018-10-23 | 2019-03-08 | 数贸科技(北京)有限公司 | Transmission method, device and the electronic equipment of cross-thread calls chain context |
US20190095181A1 (en) * | 2017-09-15 | 2019-03-28 | Tmaxsoft Co., Ltd | Easy-To-Use Type Of Compile-Time Dependency Injection Method And Device In The Java Platform |
-
2019
- 2019-04-12 CN CN201910293013.5A patent/CN110032394B/en active Active
Patent Citations (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080276231A1 (en) * | 2007-05-03 | 2008-11-06 | Yunwu Huang | Method and apparatus for dependency injection by static code generation |
US20100199259A1 (en) * | 2009-01-30 | 2010-08-05 | Quinn Timothy J | Methods and Apparatus for Dynamic Class Reloading and Versioning |
US20120284792A1 (en) * | 2009-10-08 | 2012-11-08 | Irdeto Canada Corporation | System and Method for Aggressive Self-Modification in Dynamic Function Call Systems |
CN101968766A (en) * | 2010-10-21 | 2011-02-09 | 上海交通大学 | System for detecting software bug triggered during practical running of computer program |
US20140109068A1 (en) * | 2010-12-06 | 2014-04-17 | Flexycore | Method for compiling an intermediate code of an application |
US9223554B1 (en) * | 2012-04-12 | 2015-12-29 | SourceDNA, Inc. | Recovering source code structure from program binaries |
US20140059525A1 (en) * | 2012-08-24 | 2014-02-27 | Vmware, Inc. | Method and system for facilitating replacement of system calls |
US20140059527A1 (en) * | 2012-08-24 | 2014-02-27 | Ca, Inc. | Injection of updated classes for a java agent |
CN102880493A (en) * | 2012-09-25 | 2013-01-16 | 南京大学 | Method for automatically analyzing dynamic dependency relationship between members |
US20140173571A1 (en) * | 2012-12-14 | 2014-06-19 | Salesforce.Com, Inc. | System and method for dynamic analysis bytecode injection for application dataflow |
US20140344792A1 (en) * | 2013-05-16 | 2014-11-20 | Sap Ag | Dynamic bytecode modification of classes and class hierarchies |
CN104346148A (en) * | 2013-07-30 | 2015-02-11 | 阿里巴巴集团控股有限公司 | Method, device and system for acquiring program performance consumption information |
CN103365774A (en) * | 2013-08-22 | 2013-10-23 | 北京航空航天大学 | Transient error detection method based on function call relationship |
US20150135167A1 (en) * | 2013-11-14 | 2015-05-14 | Red Hat, Inc. | Dynamic per-method probing during runtime |
US20150143339A1 (en) * | 2013-11-19 | 2015-05-21 | Google Inc. | Callpath finder |
CN104657258A (en) * | 2013-11-21 | 2015-05-27 | 腾讯科技(深圳)有限公司 | Method and device for injecting Java bit codes into target process |
CN105677311A (en) * | 2014-11-21 | 2016-06-15 | 卓望数码技术(深圳)有限公司 | Identification method and device for function call relationships |
US20180121181A1 (en) * | 2015-06-11 | 2018-05-03 | Line Corporation | Binary merging device, method, and computer program |
CN106547520A (en) * | 2015-09-16 | 2017-03-29 | 腾讯科技(深圳)有限公司 | A kind of code path analysis method and device |
WO2017087801A1 (en) * | 2015-11-20 | 2017-05-26 | Google Inc. | Dynamic update of an application in compilation and deployment |
CN107092488A (en) * | 2017-03-31 | 2017-08-25 | 武汉斗鱼网络科技有限公司 | It is a kind of that application is carried out to bury realization method and system a little without intrusionization |
CN108874470A (en) * | 2017-05-11 | 2018-11-23 | 腾讯科技(深圳)有限公司 | A kind of information processing method and server, computer storage medium |
KR20180129623A (en) * | 2017-05-26 | 2018-12-05 | 충남대학교산학협력단 | Apparatus for statically analyzing assembly code including assoxiated multi files |
CN107729015A (en) * | 2017-09-12 | 2018-02-23 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus for determining the useless function in engineering code |
US20190095181A1 (en) * | 2017-09-15 | 2019-03-28 | Tmaxsoft Co., Ltd | Easy-To-Use Type Of Compile-Time Dependency Injection Method And Device In The Java Platform |
CN108021411A (en) * | 2017-12-06 | 2018-05-11 | 国网江苏省电力有限公司电力科学研究院 | A kind of discovery system of calling service relation and discovery method |
CN108153530A (en) * | 2017-12-26 | 2018-06-12 | 网易(杭州)网络有限公司 | Optimization method, device, storage medium, processor and the terminal of bytecode |
CN109445880A (en) * | 2018-10-23 | 2019-03-08 | 数贸科技(北京)有限公司 | Transmission method, device and the electronic equipment of cross-thread calls chain context |
Non-Patent Citations (5)
Title |
---|
付文等: "隐式API调用行为的静态检测方法", 《计算机工程》 * |
刘震等: "基于动态调用图的Java程序修改影响分析技术", 《湖南师范大学自然科学学报》 * |
刘鹏飞等: "基于开放编译的面向对象程序静态分析器", 《计算机应用研究》 * |
向勇等: "基于QEMU的动态函数调用跟踪", 《计算机研究与发展》 * |
马等: "对AspectJ获取逆向工程所需基本信息的研究", 《计算机***应用》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113110842A (en) * | 2020-07-08 | 2021-07-13 | 马森 | Software bytecode homology analysis method, device and equipment |
CN114879962A (en) * | 2021-02-05 | 2022-08-09 | 华为技术有限公司 | Method and device for realizing batch system call |
CN114879962B (en) * | 2021-02-05 | 2024-06-04 | 华为技术有限公司 | Method and device for realizing batch system call |
Also Published As
Publication number | Publication date |
---|---|
CN110032394B (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105404585B (en) | Obtain the method and device of code coverage | |
CN111176961B (en) | Application program testing method and device and storage medium | |
CN104519485B (en) | Communication means, device and system between a kind of terminal | |
CN106502906B (en) | A kind of method and apparatus of test application program | |
CN107357725B (en) | Application testing method and device | |
CN105847325B (en) | The adjustment method and device of applications client | |
CN104572046B (en) | A kind of storehouse restoring method and computer system | |
CN105389259B (en) | A kind of method, apparatus and system for carrying out Application testing | |
CN107622200A (en) | The safety detecting method and device of application program | |
CN107943683A (en) | A kind of test script generation method, device, electronic equipment and storage medium | |
CN107276602B (en) | Radio frequency interference processing method, device, storage medium and terminal | |
CN105740145B (en) | The method and device of element in orient control | |
CN107329901A (en) | Packet grasping means, terminal, server and storage medium | |
CN110196795A (en) | Detect the method and relevant apparatus of mobile terminal application operating status | |
CN107219951A (en) | Touch screen control method, device, storage medium and terminal device | |
CN112667223A (en) | Method and device for generating component configuration table, electronic equipment and storage medium | |
CN107171740A (en) | Radio frequency interference processing method, device, storage medium and terminal | |
CN110032394A (en) | A kind of analysis method, device and the storage medium of passive coding file | |
CN106708555B (en) | A kind of method and apparatus loading plug-in unit | |
CN108984374A (en) | A kind of test method and system of database performance | |
CN109145598B (en) | Virus detection method and device for script file, terminal and storage medium | |
CN109522719A (en) | Reinforcing detection method, device and the mobile terminal of application installation package | |
CN108664389B (en) | Test method, test device and terminal | |
CN110198324A (en) | Data monitoring method, device, browser and terminal | |
CN106484615B (en) | The method and apparatus of record log |
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 |