CN106469259A - Determine that whether application program is method, device and the electronic equipment of legal application program - Google Patents

Determine that whether application program is method, device and the electronic equipment of legal application program Download PDF

Info

Publication number
CN106469259A
CN106469259A CN201510511426.8A CN201510511426A CN106469259A CN 106469259 A CN106469259 A CN 106469259A CN 201510511426 A CN201510511426 A CN 201510511426A CN 106469259 A CN106469259 A CN 106469259A
Authority
CN
China
Prior art keywords
classes
application program
executable file
legal
identified
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
CN201510511426.8A
Other languages
Chinese (zh)
Other versions
CN106469259B (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.)
Kingsoft Corp Ltd
Original Assignee
Kingsoft Corp 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 Kingsoft Corp Ltd filed Critical Kingsoft Corp Ltd
Priority to CN201510511426.8A priority Critical patent/CN106469259B/en
Publication of CN106469259A publication Critical patent/CN106469259A/en
Application granted granted Critical
Publication of CN106469259B publication Critical patent/CN106469259B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material

Abstract

The embodiment of the present invention disclose a kind of determine that whether application program is method, device and the electronic equipment of legal application program, can easily determine whether application program is legal.Described determine that whether application program is that the method for legal application program includes:Obtain the executable file of application program to be identified;Judge whether to contain the inner classes that there is not corresponding main classes in executable file;If there are any one inner classes in executable file, this inner classes does not correspond to the definition of main classes it is determined that application program to be identified is non-legal copy, otherwise it is determined that application program to be identified is legal.The present invention is applicable to determine whether application program is legal occasion.

Description

Determine that whether application program is method, device and the electronic equipment of legal application program
Technical field
The present invention relates to mobile security field, whether more particularly, to a kind of determination application program is legal application journey The method of sequence, device and electronic equipment.
Background technology
With the popularization of network, the application program for meeting user's different demands emerges in multitude, but occurs therewith Non- legal copy application program but have impact on application program market order.
In order to identify whether application program is legal, the general application passing through to identify of prior art Program compares to judge with legal application program, or by the signature of application program that will identify with The signature of legal application program compares to judge, if identical, for legal copy, otherwise for non-legal copy. But in order to whether recognition application is legal in prior art, need to pass through the corresponding legal copy of application program Application program, to judge, compares inconvenient, just cannot determine another such as when not having legal application program Whether application program is legal application program.
Content of the invention
In view of this, the embodiment of the present invention provides and a kind of determines that whether application program is the side of legal application program Whether method, device and electronic equipment, can recognition application be easily legal.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that:
On the one hand, the embodiment of the present invention provide a kind of determine that whether application program is the method for legal application program, Including:
Obtain the executable file of application program to be identified;
Judge whether to contain the inner classes that there is not corresponding main classes in described executable file;
If containing in described executable file and there are not the inner classes of corresponding main classes it is determined that described to be identified Application program is non-legal copy, otherwise it is determined that described application program to be identified is legal.
The generating process of the executable file of non-legal copy application program, typically first by legal executable file Decompiling is a kind of file of form, the such as file of smali form, then the file after decompiling is packaged into With the executable file format identical file before decompiling.During realizing the present invention, invention Crinis Carbonisatus Now in the middle of this process, because often original can be done with some optimizations, thus causing the loss of some class names.
Provided in an embodiment of the present invention determine that whether application program is the method for legal application program, if to be identified The executable file of application program in containing there is not the inner classes of corresponding main classes, i.e. this application to be identified The corresponding main classes of this inner classes that should exist in the executable file of program is in this application program to be identified Do not exist in executable file and do not define in other words, then the executable literary composition of this application program to be identified is described The generating process of part, as the generating process of the executable file of non-legal copy application program, thus can determine that this Application program to be identified is non-legal copy, otherwise it is determined that this application program to be identified is legal copy;So, It is also possible to easily identify that application program to be identified is in the case of not having legal application program to compare No is legal.
On the other hand, the embodiment of the present invention provides and a kind of determines that whether application program is the dress of legal application program Put, including:
Acquiring unit, for obtaining the executable file of application program to be identified;
Whether judging unit, do not exist for judging to contain in the executable file that described acquiring unit gets The inner classes of corresponding main classes;
Determining unit, if determine to contain there is not corresponding master in described executable file for described judging unit The inner classes of class it is determined that described application program to be identified is non-legal copy, otherwise it is determined that described wait to know Other application program is legal.
Provided in an embodiment of the present invention determine that whether application program is the device of legal application program, if to be identified The executable file of application program in containing there is not the inner classes of corresponding main classes, i.e. this application to be identified The corresponding main classes of this inner classes that should exist in the executable file of program is in this application program to be identified Do not exist in executable file, then illustrate the generating process of executable file of this application program to be identified with The generating process of the executable file of non-legal copy application program is the same, thus can determine that this application journey to be identified Sequence is non-legal copy, otherwise it is determined that this application program to be identified is legal copy;So, there is no legal answering It is also possible to easily identify whether application program to be identified is legal in the case of being compared with program.
Another further aspect, the embodiment of the present invention provides a kind of electronic equipment, and described electronic equipment includes:Housing 151, Processor 152, memorizer 153, circuit board 154 and power circuit 155, wherein, circuit board 154 disposes The interior volume surrounding in housing 151, processor 152 and memorizer 153 are arranged on circuit board 154; Power circuit 155, for being each circuit of above-mentioned electronic equipment or device is powered;Memorizer 153 is used for depositing Storage executable program code;Processor 152 passes through to read the executable program code of storage in memorizer 153 To run program corresponding with executable program code, for executing following steps:
Obtain the executable file of application program to be identified;
Judge whether to contain the inner classes that there is not corresponding main classes in described executable file;
If containing in described executable file and there are not the inner classes of corresponding main classes it is determined that described to be identified Application program is non-legal copy, otherwise it is determined that described application program to be identified is legal.
Electronic equipment provided in an embodiment of the present invention, if contain in the executable file of application program to be identified There are not the inner classes of corresponding main classes, should exist in the executable file of this application program to be identified The corresponding main classes of this inner classes does not exist in the executable file of this application program to be identified, then explanation should The generating process of the executable file of application program to be identified and the executable file of non-legal copy application program Generating process is the same, thus can determine that this application program to be identified is non-legal copy, otherwise it is determined that this is treated The application program of identification is legal copy;So, in the case of not having legal application program to compare it is also possible to Easily identify whether application program to be identified is legal.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to enforcement Example or description of the prior art in required use accompanying drawing be briefly described it should be apparent that, below describe In accompanying drawing be only some embodiments of the present invention, for those of ordinary skill in the art, do not paying On the premise of going out creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is that the present invention is a kind of determines that whether application program is the stream of method one embodiment of legal application program Journey schematic diagram;
Fig. 2 is that the present invention is a kind of determines that whether application program is another embodiment of method of legal application program Part schematic flow sheet;
Fig. 3 is the schematic flow sheet of S2 mono- embodiment in Fig. 1;
Fig. 4 is the schematic flow sheet of S20 mono- embodiment in Fig. 3;
Fig. 5 is the schematic flow sheet of S201 mono- embodiment in Fig. 4;
Fig. 6 is the schematic flow sheet of S21 mono- embodiment in Fig. 3;
Fig. 7 is the schematic flow sheet of S2100 mono- embodiment in Fig. 6;
Fig. 8 is that the present invention is a kind of determines that whether application program is the side of device one embodiment of legal application program Mount structure schematic diagram;
Fig. 9 is the frame structure schematic diagram of acquiring unit one embodiment in Fig. 8;
Figure 10 is the frame structure schematic diagram of judging unit one embodiment in Fig. 8;
Figure 11 is the frame structure schematic diagram of the first judgment sub-unit one embodiment in Figure 10;
Figure 12 is the frame structure schematic diagram of the first judge module one embodiment in Figure 11;
Figure 13 is the frame structure schematic diagram of the second judgment sub-unit one embodiment in Figure 10;
Figure 14 is the frame structure schematic diagram of corresponding main classes name acquiring module one embodiment in Figure 13;
Figure 15 is the structural representation of one embodiment of electronic equipment of the present invention.
Specific embodiment
A kind of to the embodiment of the present invention below in conjunction with the accompanying drawings determine that whether application program is the side of legal application program Method and device are described in detail.
It will be appreciated that described embodiment is only a part of embodiment of the present invention, rather than whole reality Apply example.Based on the embodiment in the present invention, those of ordinary skill in the art are not before making creative work Put all other embodiment being obtained, broadly fall into the scope of protection of the invention.
Referring to Fig. 1, embodiments of the invention provide and a kind of determine that whether application program is the side of legal application program Method, including:
The executable file of S1, acquisition application program to be identified;
S2, judge whether to contain the inner classes that there is not corresponding main classes in described executable file;
In the present embodiment, for example, main classes X has inner classes Y, it is represented by X $ Y;Wherein, X It is the main classes of Y, Y is the inner classes of X.
If containing in the described executable file of S3 and there are not the inner classes of corresponding main classes it is determined that described wait to know Other application program is non-legal copy, otherwise it is determined that described application program to be identified is legal.
In the present embodiment, system environmentss that application program to be identified runs can be Android system it is also possible to It is other operating system, the present invention is not construed as limiting to this.
The generating process of the executable file of non-legal copy application program, typically first by legal executable file Decompiling is a kind of file of form, the such as file of smali form, then the file after decompiling is packaged into With the executable file format identical file before decompiling.During realizing the present invention, invention Crinis Carbonisatus Now in the middle of this process, because often original can be done with some optimizations, thus causing the loss of some class names.
Provided in an embodiment of the present invention determine that whether application program is the method for legal application program, if to be identified The executable file of application program in containing there is not the inner classes of corresponding main classes, i.e. this application to be identified The corresponding main classes of this inner classes that should exist in the executable file of program is in this application program to be identified Do not exist in executable file, then illustrate the generating process of executable file of this application program to be identified with The generating process of the executable file of non-legal copy application program is the same, thus can determine that this application journey to be identified Sequence is non-legal copy, otherwise it is determined that this application program to be identified is legal copy;So, there is no legal answering It is also possible to easily identify whether application program to be identified is legal in the case of being compared with program.
Alternatively, present invention determine that whether application program is another embodiment of the method for legal application program In, described application program is operate in the application program of Android operation system;
Wherein, the described executable file obtaining application program to be identified, including:
Obtain the executable file dex file in application program to be identified.
In the present embodiment, dex file is the type of executable file in Android platform.
Alternatively, referring to Fig. 2, present invention determine that whether application program is the another of the method for legal application program In one embodiment, the described executable file dex file obtaining in application program to be identified, including:
The file of S10, the acquisition apk form of application program to be identified;
S11, by decompressing to the file of described apk form, obtain in described application program to be identified Executable file dex file.
In the present embodiment, if getting the file of the apk form of application program to be identified, it is right to need This document is decompressed, such that it is able to obtain executable file classes.dex therein.
Wherein, apk is the abbreviation of AndroidPackage, i.e. Android installation kit.Android sdk The engineering of compiling is packaged into an installation procedure file, and form is apk.By apk file is passed directly to In Android simulator or Android phone, execution can be installed.
Alternatively, referring to Fig. 3, present invention determine that whether application program is the another of the method for legal application program In one embodiment, described judge whether to contain the inner classes that there is not corresponding main classes in described executable file (S2), including:
S20, judge in described executable file whether there is inner classes;
If there are inner classes in the described executable file of S21, judge each present in described executable file Whether the corresponding main classes of individual inner classes all exists in described executable file;
If there are inner classes, this inner classes in each inner classes present in the described executable file of S22 Corresponding main classes do not exist in described executable file it is determined that in described executable file contain do not exist , otherwise there is not corresponding main classes it is determined that not containing in described executable file in the inner classes of corresponding main classes Inner classes.
In the present embodiment, class is the definition in Object-Oriented Programming Languages to certain object, and it includes Close the information of object action mode, including title, method, attribute and event.
Another class can be defined in the inside of a class, this species is referred to as nested class, and it has two types, I.e. static nested class and non-static nested class.Static nested class is using seldom it is most important that non-static nesting Class, that is to say and be called inner classes.
Alternatively, referring to Fig. 4, present invention determine that whether application program is the another of the method for legal application program In one embodiment, in the described executable file of described judgement, whether there is inner classes (S20), including:
S200, the name list of the class extracted from described executable file in described executable file;
S201, judge the title with the presence or absence of inner classes in the name list of described class, if exist it is determined that There are inner classes, otherwise it is determined that there are not inner classes in described executable file in described executable file.
In the present embodiment, by judging in the name list of the class in executable file with the presence or absence of inner classes Title, can be easy to determine in executable file with the presence or absence of inner classes.
Alternatively, referring to Fig. 5, present invention determine that whether application program is the another of the method for legal application program In one embodiment, with the presence or absence of the title (S201) of inner classes, bag in the name list of the described class of described judgement Include:
S2010, judge to whether there is ' the title of X $ Y ' form in the name list of described class;Wherein, institute State ' X ' and all represent any one or more characters with described ' Y ';
If existing in the name list of the described class of S2011, ' title of X $ Y ' form is it is determined that described class There is the title of inner classes, otherwise it is determined that there is not inside in the name list of described class in name list The title of class.
In the present embodiment, because the title of inner classes is ' X $ Y ' form, therefore only need to judge the name of class Claim in list with the presence or absence of ' title of X $ Y ' form is it is possible to whether there is in determining the name list of class The title of inner classes:' title of X $ Y ' form, then should the ' title of X $ Y ' form as inside for presence The title of class.
Alternatively, referring to Fig. 6, present invention determine that whether application program is the another of the method for legal application program In one embodiment, if there are inner classes in described executable file, judge in described executable file Whether the corresponding main classes of each inner classes existing all has (S21) in described executable file, including:
The title of the corresponding main classes of each inner classes present in S210, the described executable file of acquisition;
S211, judge each inner classes present in described executable file corresponding main classes title, in institute State in the name list of class and whether all exist;
If the title of the corresponding main classes of each inner classes present in the described executable file of S212, described All there is the corresponding master it is determined that each inner classes present in described executable file in the name list of class Class all exists in described executable file, otherwise it is determined that present in described executable file in each There are inner classes, the corresponding main classes of this inner classes does not exist in described executable file in category.
In the present embodiment, comprise the title of all classes in executable file in the name list of class, by looking into Whether have identical with the title of the corresponding main classes of inner classes present in executable file in the name list asking class Class title, can be easy to determine executable file in the presence or absence of inner classes corresponding main classes.
Alternatively, referring to Fig. 7, present invention determine that whether application program is the another of the method for legal application program In one embodiment, the described title obtaining the corresponding main classes of each inner classes present in described executable file (S210), including:
If existing in the name list of the described class of S2100, ' title of X $ Y ' form obtains the name of described class Claim ' the title of X $ Y ' form present in list;
S2101, from described ' extract the character string of ' X ' part the title of X $ Y ' form, as should Inner classes ' the title of the corresponding main classes of X $ Y '.
In the present embodiment, inner classes ' in the title of X $ Y ' form, the string representation of ' X ' part is The title of the corresponding main classes of this inner classes, the title of such as inner classes is Landroid/graphics/PorterDuff $ Mode ", then the title of the corresponding main classes of this inner classes be exactly “Landroid/graphics/PorterDuff”.
Referring to Fig. 8, embodiments of the invention provide and a kind of determine that whether application program is the dress of legal application program Put, including:
Acquiring unit 1, for obtaining the executable file of application program to be identified;
Whether judging unit 2, do not deposit for judging to contain in the executable file that described acquiring unit 1 gets Inner classes in corresponding main classes;In the present embodiment, for example, main classes X has inner classes Y, is represented by X$Y;Wherein, X is the main classes of Y, and Y is the inner classes of X.
Determining unit 3, if determine to contain there is not correspondence in described executable file for described judging unit 2 The inner classes of main classes are it is determined that described application program to be identified is non-legal copy, otherwise it is determined that described treat The application program of identification is legal.
As it was previously stated, the generating process of the executable file of non-legal copy application program, typically first will be legal Executable file decompiling is a kind of file of form, the such as file of smali form, then by after decompiling File is packaged into and the executable file format identical file before decompiling.During realizing the present invention, Inventor finds in the middle of this process, because often original can be done with some optimizations, thus causing some class names Loss.
Provided in an embodiment of the present invention determine that whether application program is the device of legal application program, if to be identified The executable file of application program in containing there is not the inner classes of corresponding main classes, i.e. this application to be identified The corresponding main classes of this inner classes that should exist in the executable file of program is in this application program to be identified Do not exist in executable file, then illustrate the generating process of executable file of this application program to be identified with The generating process of the executable file of non-legal copy application program is the same, thus can determine that this application journey to be identified Sequence is non-legal copy, otherwise it is determined that this application program to be identified is legal copy;So, there is no legal answering It is also possible to easily identify whether application program to be identified is legal in the case of being compared with program.
Alternatively, present invention determine that whether application program is another embodiment of the device of legal application program In, described application program is operate in the application program of Android operation system;
Wherein, described acquiring unit, for obtaining the literary composition of the executable file dex in application program to be identified Part.
In the present embodiment, dex file is the type of executable file in Android platform.
Alternatively, referring to Fig. 9, present invention determine that whether application program is the another of the device of legal application program In one embodiment, described acquiring unit 1, including:
First acquisition subelement 10, for obtaining the file of the apk form of application program to be identified;
Second acquisition subelement 11, for the described apk by getting to the described first acquisition subelement 10 The file of form is decompressed, and obtains the executable file dex file in described application program to be identified.
In the present embodiment, if getting the file of the apk form of application program to be identified, it is right to need This document is decompressed, such that it is able to obtain executable file classes.dex therein.
Wherein, apk is the abbreviation of AndroidPackage, i.e. Android installation kit.Android sdk The engineering of compiling is packaged into an installation procedure file, and form is apk.By apk file is passed directly to In Android simulator or Android phone, execution can be installed.
Alternatively, referring to Figure 10, present invention determine that whether application program is the device of legal application program In another embodiment, described judging unit 2, including:
Whether the first judgment sub-unit 20, for judging in the executable file that described acquiring unit 1 gets There are inner classes;
Second judgment sub-unit 21, if determine in described executable file for described first judgment sub-unit 20 There are inner classes, then judge the corresponding main classes of each inner classes present in described executable file described can Whether all exist in execution file;
Determination subelement 22, if determine in described executable file exist for described second judgment sub-unit 21 Each inner classes in there are inner classes, the corresponding main classes of this inner classes in described executable file not Exist and there are not the inner classes of corresponding main classes it is determined that containing in described executable file, otherwise it is determined that The inner classes that there is not corresponding main classes are not contained in described executable file.
In the present embodiment, class is the definition in Object-Oriented Programming Languages to certain object, and it includes Close the information of object action mode, including title, method, attribute and event.Can be in the inside of a class Define another class, this species is referred to as nested class, it has two types, i.e. static nested class and non-static embedding Set class.Static nested class it is most important that non-static nested class, that is to say and is called inside using seldom Class.
Alternatively, referring to Figure 11, present invention determine that whether application program is the device of legal application program In another embodiment, described first judgment sub-unit 21, including:
Extraction module 210, for holding described in extraction from the executable file that described acquiring unit 1 gets The name list of the class in style of writing part;
First judge module 211, for judging in the name list of class that described extraction module 210 extracts to be The no title that there are inner classes;
First determining module 212, if determine in the name list of described class for described first judge module 211 There is the title of inner classes it is determined that there are inner classes in described executable file, otherwise it is determined that described There are not inner classes in executable file.
In the present embodiment, by judging in the name list of the class in executable file with the presence or absence of inner classes Title, can be easy to determine in executable file with the presence or absence of inner classes.
Alternatively, referring to Figure 12, present invention determine that whether application program is the device of legal application program In another embodiment, described first judge module 211, including:
Judging submodule 2110, for judging in the name list of class that described extraction module 210 extracts to be No presence ' the title of X $ Y ' form;Wherein, described ' X ' and described ' Y ' all represent any one Or multiple character;
Determination sub-module 2111, if deposit determine the name list of described class for described judging submodule 2110 in ' title of X $ Y ' form it is determined that described class name list in there is the title of inner classes, otherwise, Then determine the title that there are not inner classes in the name list of described class.
In the present embodiment, because the title of inner classes is ' X $ Y ' form, therefore only need to judge the name of class Claim in list with the presence or absence of ' title of X $ Y ' form is it is possible to whether there is in determining the name list of class The title of inner classes:' title of X $ Y ' form, then should the ' title of X $ Y ' form as inside for presence The title of class.
Alternatively, referring to Figure 13, present invention determine that whether application program is the device of legal application program In another embodiment, described second judgment sub-unit 3, including:
Corresponding main classes name acquiring module 30, for obtaining each inner classes present in described executable file Corresponding main classes title;
Second judge module 31, for judging that described corresponding main classes name acquiring module 30 can described in getting The title of the corresponding main classes of each inner classes present in execution file, in the name list of described class whether All exist;
Second determining module 32, if determine in described executable file exist for described second judge module 31 The corresponding main classes of each inner classes title, all exist it is determined that institute in the name list of described class The corresponding main classes stating each inner classes present in executable file all exists in described executable file, no Then it is determined that there are inner classes, this inner classes in each inner classes present in described executable file Corresponding main classes do not exist in described executable file.
In the present embodiment, comprise the title of all classes in executable file in the name list of class, by looking into Whether have identical with the title of the corresponding main classes of inner classes present in executable file in the name list asking class Class title, can be easy to determine executable file in the presence or absence of this inner classes corresponding main classes.
Alternatively, referring to Figure 14, present invention determine that whether application program is the device of legal application program In another embodiment, described corresponding main classes name acquiring module 30, including:
Acquisition submodule 300, if deposit determine the name list of described class for described determination sub-module 2111 in ' title of X $ Y ' form, obtain described class name list present in the ' title of X $ Y ' form;
Extracting sub-module 301, for ' the title of X $ Y ' form getting from described acquisition submodule 300 In extract the character string of ' X ' part, be this inner classes ' title of the corresponding main classes of X $ Y '.
In the present embodiment, inner classes ' in the title of X $ Y ' form, the string representation of ' X ' part is The title of the corresponding main classes of this inner classes, the title of such as inner classes is Landroid/graphics/PorterDuff $ Mode ", then the title of the corresponding main classes of this inner classes be exactly “Landroid/graphics/PorterDuff”.
The embodiment of the present invention also provides a kind of electronic equipment, and described electronic equipment comprises aforementioned any embodiment institute The device stated.
Figure 15 is the structural representation of one embodiment of electronic equipment of the present invention, it is possible to achieve Fig. 1-7 of the present invention The flow process of illustrated embodiment, as shown in figure 15, above-mentioned electronic equipment can include:Housing 151, processor 152nd, memorizer 153, circuit board 154 and power circuit 155, wherein, circuit board 154 is placed in housing 151 interior volume surrounding, processor 152 and memorizer 153 are arranged on circuit board 154;Power circuit 155, for being each circuit of above-mentioned electronic equipment or device is powered;Memorizer 153 is used for storing executable Program code;Processor 152 by read memorizer 153 in storage executable program code run with The corresponding program of executable program code, for executing following steps:Obtain application program to be identified can Execution file;Judge whether to contain the inner classes that there is not corresponding main classes in described executable file;If described Contain in executable file and there are not the inner classes of corresponding main classes it is determined that described application program to be identified is Non- legal copy, otherwise it is determined that described application program to be identified is legal.
Processor 152 passes through to run executable journey to the concrete implementation procedure of above-mentioned steps and processor 152 The step that sequence code to execute further, may refer to the description of Fig. 1-7 illustrated embodiment of the present invention, here is not Repeat again.
Electronic equipment provided in an embodiment of the present invention, if contain in the executable file of application program to be identified There are not the inner classes of corresponding main classes, should exist in the executable file of this application program to be identified The corresponding main classes of this inner classes does not exist in the executable file of this application program to be identified, then explanation should The generating process of the executable file of application program to be identified and the executable file of non-legal copy application program Generating process is the same, thus can determine that this application program to be identified is non-legal copy, otherwise it is determined that this is treated The application program of identification is legal copy;So, in the case of not having legal application program to compare it is also possible to Easily identify whether application program to be identified is legal.
This electronic equipment exists in a variety of forms, including but not limited to:
(1) mobile communication equipment:The feature of this kind equipment is that possess mobile communication function, and with provide speech, Data communication is main target.This Terminal Type includes:Smart mobile phone (such as iPhone), multimedia handset, Feature mobile phone, and low-end mobile phone etc..
(2) super mobile personal computer equipment:This kind equipment belongs to the category of personal computer, has calculating and locates Reason function, typically also possesses mobile Internet access characteristic.This Terminal Type includes:PDA, MID and UMPC set Standby etc., such as iPad.
(3) portable entertainment device:This kind equipment can show and play content of multimedia.This kind equipment includes: Audio frequency, video player (such as iPod), handheld device, e-book, and intelligent toy and portable Formula in-vehicle navigation apparatus.
(4) server:The equipment of the service of calculating is provided, the composition of server include processor, hard disk, internal memory, System bus etc., server is similar with general computer architecture, but due to needing to provide highly reliable clothes Business, therefore at aspects such as disposal ability, stability, reliability, safety, extensibility, manageabilitys Require higher.
(5) other have the electronic installation of data interaction function.
One of ordinary skill in the art will appreciate that realizing all or part of flow process in above-described embodiment method, Can be by computer program to complete come the hardware to instruct correlation, described program can be stored in a calculating In machine read/write memory medium, this program is upon execution, it may include as the flow process of the embodiment of above-mentioned each method. Wherein, described storage medium can for magnetic disc, CD, read-only memory (Read-Only Memory, ) or random access memory (Random Access Memory, RAM) etc. ROM.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited to This, any those familiar with the art the invention discloses technical scope in, can readily occur in Change or replacement, all should be included within the scope of the present invention.Therefore, protection scope of the present invention Should be defined by scope of the claims.

Claims (10)

1. whether a kind of determination application program is the method for legal application program it is characterised in that including:
Obtain the executable file of application program to be identified;
Judge whether to contain the inner classes that there is not corresponding main classes in described executable file;
If containing in described executable file and there are not the inner classes of corresponding main classes it is determined that described to be identified Application program is non-legal copy, otherwise it is determined that described application program to be identified is legal.
2. according to claim 1 determine that whether application program is the method for legal application program, it is special Levy and be, described application program is operate in the application program of Android operation system;
Wherein, the described executable file obtaining application program to be identified, including:
Obtain the executable file dex file in application program to be identified.
3. according to claim 2 determine that whether application program is the method for legal application program, it is special Levy and be, the described executable file dex file obtaining in application program to be identified, including:
Obtain the file of the apk form of application program to be identified;
By decompressing to the file of described apk form, obtain in described application program to be identified can Execution file dex file.
4. whether the determination application program according to any one of claims 1 to 3 is legal application program Method it is characterised in that described judge whether to contain in described executable file there is not the interior of corresponding main classes Category, including:
Judge to whether there is inner classes in described executable file;
If there are inner classes in described executable file, judge present in described executable file in each Whether the corresponding main classes of category all exists in described executable file;
If there are any one inner classes in each inner classes present in described executable file, this inner classes Corresponding main classes do not exist in described executable file it is determined that in described executable file contain do not exist , otherwise there is not corresponding main classes it is determined that not containing in described executable file in the inner classes of corresponding main classes Inner classes.
5. according to claim 4 determine that whether application program is the method for legal application program, it is special Levy and be, in the described executable file of described judgement, whether there is inner classes, including:
The name list of the class in described executable file is extracted from described executable file;
Judge in the name list of described class, to whether there is the title of inner classes, if existing it is determined that described can There are inner classes, otherwise it is determined that there are not inner classes in described executable file in execution file.
6. according to claim 5 determine that whether application program is the method for legal application program, it is special Levy and be, with the presence or absence of the title of inner classes in the name list of the described class of described judgement, including:
Judge to whether there is ' the title of X $ Y ' form in the name list of described class;Wherein, described ' X ' All represent any one or more characters with described ' Y ';
If existing in the name list of described class, ' title of X $ Y ' form is it is determined that the name column of described class There is the title of inner classes, otherwise it is determined that there is not the name of inner classes in the name list of described class in table Claim.
7. whether the determination application program according to claim 5 or 6 is the method for legal application program, It is characterized in that, if there are inner classes in described executable file, judge in described executable file Whether the corresponding main classes of each inner classes existing all exists in described executable file, including:
Obtain the title of the corresponding main classes of each inner classes present in described executable file;
Judge the title of the corresponding main classes of each inner classes present in described executable file, in described class Whether all exist in name list;
If the title of the corresponding main classes of each inner classes present in described executable file, in the name of described class All exist it is determined that the corresponding main classes of each inner classes present in described executable file is in institute in title list State in executable file and all exist, otherwise it is determined that in each inner classes present in described executable file There are inner classes, the corresponding main classes of this inner classes does not exist in described executable file.
8. according to claim 7 determine that whether application program is the method for legal application program, it is special Levy and be, the described title obtaining the corresponding main classes of each inner classes present in described executable file, bag Include:
If existing in the name list of described class, ' title of X $ Y ' form obtains the name list of described class Present in ' the title of X $ Y ' form;
' extract the character string of ' X ' part the title of X $ Y ' form, be this inner classes ' X $ Y ' from described Corresponding main classes title.
9. whether a kind of determination application program is the device of legal application program it is characterised in that including:
Acquiring unit, for obtaining the executable file of application program to be identified;
Whether judging unit, do not exist for judging to contain in the executable file that described acquiring unit gets The inner classes of corresponding main classes;
Determining unit, if determine to contain there is not corresponding master in described executable file for described judging unit The inner classes of class it is determined that described application program to be identified is non-legal copy, otherwise it is determined that described wait to know Other application program is legal.
10. a kind of electronic equipment is it is characterised in that described electronic equipment includes:Housing 151, processor 152, Memorizer 153, circuit board 154 and power circuit 155, wherein, circuit board 154 is placed in housing 151 and encloses The interior volume becoming, processor 152 and memorizer 153 are arranged on circuit board 154;Power circuit 155, For being each circuit of above-mentioned electronic equipment or device is powered;Memorizer 153 is used for storing executable program Code;Processor 152 is run by the executable program code of storage in reading memorizer 153 and can hold The corresponding program of line program code, for executing following steps:
Obtain the executable file of application program to be identified;
Judge whether to contain the inner classes that there is not corresponding main classes in described executable file;
If containing in described executable file and there are not the inner classes of corresponding main classes it is determined that described to be identified Application program is non-legal copy, otherwise it is determined that described application program to be identified is legal.
CN201510511426.8A 2015-08-19 2015-08-19 Determine application program whether be legal application program method, apparatus and electronic equipment Active CN106469259B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510511426.8A CN106469259B (en) 2015-08-19 2015-08-19 Determine application program whether be legal application program method, apparatus and electronic equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510511426.8A CN106469259B (en) 2015-08-19 2015-08-19 Determine application program whether be legal application program method, apparatus and electronic equipment
PCT/CN2016/094449 WO2017028729A1 (en) 2015-08-19 2016-08-10 Method, apparatus, and electronic device for determining whether an application program is an authorized application program

Publications (2)

Publication Number Publication Date
CN106469259A true CN106469259A (en) 2017-03-01
CN106469259B CN106469259B (en) 2019-07-23

Family

ID=58050768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510511426.8A Active CN106469259B (en) 2015-08-19 2015-08-19 Determine application program whether be legal application program method, apparatus and electronic equipment

Country Status (2)

Country Link
CN (1) CN106469259B (en)
WO (1) WO2017028729A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050039029A1 (en) * 2002-08-14 2005-02-17 Alexander Shipp Method of, and system for, heuristically detecting viruses in executable code
CN103473104A (en) * 2013-09-24 2013-12-25 北京大学 Method for discriminating re-package of application based on keyword context frequency matrix
EP2693356A2 (en) * 2012-08-02 2014-02-05 Google Inc. Detecting pirated applications
CN103984883A (en) * 2014-05-21 2014-08-13 湘潭大学 Class dependency graph based Android application similarity detection method
CN104123493A (en) * 2014-07-31 2014-10-29 百度在线网络技术(北京)有限公司 Method and device for detecting safety performance of application program
CN104424402A (en) * 2013-08-28 2015-03-18 卓易畅想(北京)科技有限公司 Method and device for detecting pirated application program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024120A (en) * 2009-09-18 2011-04-20 无锡安腾软件开发有限公司 Method for using digital signature to detect falsification possibility of software
CN103902887A (en) * 2012-12-24 2014-07-02 珠海市君天电子科技有限公司 Method and device for identifying source of file according to signature
CN104346568A (en) * 2013-07-26 2015-02-11 贝壳网际(北京)安全技术有限公司 Method and device for identifying malicious applications as well as mobile device
CN104657634B (en) * 2015-02-28 2017-11-14 百度在线网络技术(北京)有限公司 The recognition methods of piracy application and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050039029A1 (en) * 2002-08-14 2005-02-17 Alexander Shipp Method of, and system for, heuristically detecting viruses in executable code
EP2693356A2 (en) * 2012-08-02 2014-02-05 Google Inc. Detecting pirated applications
CN104424402A (en) * 2013-08-28 2015-03-18 卓易畅想(北京)科技有限公司 Method and device for detecting pirated application program
CN103473104A (en) * 2013-09-24 2013-12-25 北京大学 Method for discriminating re-package of application based on keyword context frequency matrix
CN103984883A (en) * 2014-05-21 2014-08-13 湘潭大学 Class dependency graph based Android application similarity detection method
CN104123493A (en) * 2014-07-31 2014-10-29 百度在线网络技术(北京)有限公司 Method and device for detecting safety performance of application program

Also Published As

Publication number Publication date
WO2017028729A1 (en) 2017-02-23
CN106469259B (en) 2019-07-23

Similar Documents

Publication Publication Date Title
CN107341014A (en) Electronic equipment, the generation method of technical documentation and device
CN104268472B (en) Reduction is by the method and apparatus of third party's dynamic base Modification growth function address
CN105045928A (en) Method, device and electronic equipment for displaying to-be-cleaned data
CN106060220B (en) A kind of contact information creation method and mobile terminal
CN104866770A (en) Sensitive data scanning method and sensitive data scanning system
CN105183464A (en) Information presentation method, information presentation apparatus and electrical device
CN105653949B (en) A kind of malware detection methods and device
CN105138351A (en) Method and device for configuring plug-in package for host
CN109446753A (en) Detect method, apparatus, computer equipment and the storage medium of pirate application program
CN104680065A (en) Virus detection method, virus detection device and virus detection equipment
CN105354459A (en) Information processing method and device, and electronic equipment
CN106469259A (en) Determine that whether application program is method, device and the electronic equipment of legal application program
CN106557525A (en) The method for cleaning of application program Stub File, device and electronic equipment
CN105468411A (en) Application processing method and apparatus and electronic device
CN105787302A (en) Application program processing method and device and electronic equipment
CN106815000A (en) A kind of code generating method and device
CN108416212A (en) Method for identifying application program and device
CN109002696A (en) It establishes the method for installation kit identification model, identify the method and device of installation kit
CN103905391A (en) Botnet command and control protocol acquisition method and device
CN106201579B (en) A kind of method, apparatus and electronic equipment for deleting registry boot item
CN108875363B (en) Method and device for accelerating virtual execution, electronic equipment and storage medium
CN111399844A (en) Secure compiling method and device, electronic equipment and computer readable medium
JP6561633B2 (en) Program, information processing apparatus and information processing method
KR101382490B1 (en) Method and apparatus for creating DB
CN109542460A (en) A kind of method and electronic equipment based on access typescript in the vue for educating operating system

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