CN106529225A - Device and method for protecting source code of application program - Google Patents

Device and method for protecting source code of application program Download PDF

Info

Publication number
CN106529225A
CN106529225A CN201610951990.6A CN201610951990A CN106529225A CN 106529225 A CN106529225 A CN 106529225A CN 201610951990 A CN201610951990 A CN 201610951990A CN 106529225 A CN106529225 A CN 106529225A
Authority
CN
China
Prior art keywords
source code
logical block
module
application program
application
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.)
Pending
Application number
CN201610951990.6A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610951990.6A priority Critical patent/CN106529225A/en
Publication of CN106529225A publication Critical patent/CN106529225A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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 ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a device and a method for protecting a source code of an application program. The device comprises a splitting module, an arrangement module and a conversion module, wherein the splitting module is used for splitting the source code of the application program into logical units which are arranged in sequence; the arrangement module is used for carrying out random out-of-order arrangement on the logical units which are arranged in sequence and arranging a jump identifier to each logical unit; the jump identifiers are used for identifying the arrangement order of the logical units after random out-of-order arrangement; and the conversion module is used for converting all logical units and jump identifiers into the application program. According to the device and the method for protecting the source code of the application program, which are provided by the invention, a loophole of obtaining the source code of the application program through decompiling of the application program can be effectively avoided, the security of the source code of the application program is improved, and the design thought of the application program is effectively protected.

Description

A kind of application source code protection device and method
Technical field
The present invention relates to security technology area, more particularly to a kind of application source code protection device and method.
Background technology
With requirement of the user to intelligent mobile terminal function, various application programs arise at the historic moment, the exploitation of application program Need to put into substantial amounts of man power and material and develop, however, as intelligent mobile terminal operating system itself is to application program Source code protection not enough, application program can be by decompiling easily out.At present, the intelligent sliding such as Google (Google) Dynamic terminal operating system development company also begins to pay attention to the source code protection of application program, develops a java Code obfuscation Instrument proguard.Obscured by proguard, even if the installation kit of decompiling application program, some can be presented only also and be difficult to see The source code understood, so that reach the effect of protection application source code.But, even if application source code is confused, The order of application source code is still order, and the thinking logic of the developer of application program is not confused, instead The developing thought of application program can be still stolen in compiling.
The content of the invention
Present invention is primarily targeted at proposing a kind of application source code protection device and method, it is intended to solve existing The defect of application source code can be obtained in technology by the decompiling to application program.
For achieving the above object, a kind of application source code protection device that the present invention is provided, described device include:
Module is split, for application source code is split as tactic logical block;
Arrangement module, for carrying out random disorder arrangement to the tactic logical block, and is each logic Unit arranges one and redirects mark;It is described that to redirect mark suitable for identifying the arrangement after logical block random disorder arrangement Sequence;
Modular converter, for by all logical blocks and redirecting mark and being converted to application program.
Alternatively, described device also includes:
Decompiling module, for carrying out decompiling to application program, be applied program source code, and by application program source Code is sent to fractionation module.
Alternatively, the fractionation module, specifically includes:
Parsing module, for parsing to application source code, the execution logic of the program source code that is applied;
Logic splits module, for application source code is split as tactic logic according to the execution logic Unit.
Alternatively, it is described redirect mark be arranged at corresponding logical block before, after corresponding logical block, all patrol Before collecting unit or after all logical blocks.
Alternatively, the modular converter, specifically includes:
Transcode module, for by all logical blocks and redirecting mark and being converted to rearrangement source code;
Packetization module, for being converted to application program by the rearrangement source code.
Additionally, for achieving the above object, the present invention also proposes a kind of application source code guard method, methods described bag Include following steps:
Application source code is split as into tactic logical block;
Random disorder arrangement is carried out to the tactic logical block, and one jump is set for each logical block Turn mark;It is described to redirect mark for identifying putting in order after the logical block random disorder arrangement;
By all logical blocks and redirect mark and be converted to application program.
Alternatively, it is described the source code of application program is split as into tactic logical block before, methods described Also include:
Decompiling is carried out to application program, be applied program source code.
Alternatively, it is described that application source code is split as into tactic logical block, specifically include:
Application source code is parsed, the execution logic of the program source code that is applied;
Application source code is split as by tactic logical block according to the execution logic.
Alternatively, it is described redirect mark be arranged at corresponding logical block before, after corresponding logical block, all patrol Before collecting unit or after all logical blocks.
Alternatively, it is described by all logical blocks and to redirect mark and be converted to application program, specifically include:
By all logical blocks and redirect mark and be converted to rearrangement source code;
The rearrangement source code is converted to into application program.
A kind of application source code protection device proposed by the present invention and method, can be prevented effectively from by applying journey The decompiling of sequence obtains the leak of application source code, improve the source code safety of application program, and effective protection should Use programming thinking.
Description of the drawings
Fig. 1 is the hardware architecture diagram for realizing each one optional mobile terminal of embodiment of the invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Application source code guard method flow charts of the Fig. 3 for first embodiment of the invention;
Application source code guard method flow charts of the Fig. 4 for second embodiment of the invention;
Application source code protection device composition structural representations of the Fig. 5 for third embodiment of the invention;
Application source code protection device composition structural representations of the Fig. 6 for fourth embodiment of the invention.
The realization of the object of the invention, functional characteristics and advantage will be described further in conjunction with the embodiments referring to the drawings.
Specific embodiment
It should be appreciated that specific embodiment described herein is not intended to limit the present invention only to explain the present invention.
The mobile terminal of each embodiment of the invention is realized referring now to Description of Drawings.In follow-up description, use For representing the suffix of such as " module ", " part " or " unit " of element only for being conducive to the explanation of the present invention, itself Not specific meaning.Therefore, " module " mixedly can be used with " part ".
Mobile terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as moving Phone, smart phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP The mobile terminal of (portable media player), guider etc. and such as numeral TV, desk computer etc. are consolidated Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that, except being used in particular for movement Outside the element of purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Fig. 1 is that the hardware configuration for realizing each one optional mobile terminal of embodiment of the invention is illustrated.
Mobile terminal 1 00 can include wireless communication unit 110, A/V (audio/video) input block 120, user input Unit 130, sensing unit 140, output unit 150, memorizer 160, interface unit 170, controller 180 and power subsystem 190 Etc..Fig. 1 shows the mobile terminal with various assemblies, it should be understood that being not required for implementing all groups for illustrating Part.More or less of component can alternatively be implemented.Will be discussed in more detail below the element of mobile terminal.
Wireless communication unit 110 generally includes one or more assemblies, and which allows mobile terminal 1 00 and wireless communication system Or the radio communication between network.For example, wireless communication unit can include broadcasting reception module 111, mobile communication module 112nd, at least one of wireless Internet module 113, short range communication module 114 and location information module 115.
Broadcasting reception module 111 receives broadcast singal and/or broadcast via broadcast channel from external broadcast management server Relevant information.Broadcast channel can include satellite channel and/or terrestrial channel.Broadcast management server can be generated and sent The broadcast singal generated before the server or reception of broadcast singal and/or broadcast related information and/or broadcast related information And send it to the server of terminal.Broadcast singal can include TV broadcast singals, radio signals, data broadcasting Signal etc..And, broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast phase Pass information can also be provided via mobile communications network, and in this case, broadcast related information can be by mobile communication mould Block 112 is receiving.Broadcast singal can be present in a variety of manners, and for example, which can be with the electronics of DMB (DMB) The form of program guide (EPG), the electronic service guidebooks (ESG) of digital video broadcast-handheld (DVB-H) etc. and exist.Broadcast Receiver module 111 can receive signal broadcast by using various types of broadcast systems.Especially, broadcasting reception module 111 Can be wide by using such as multimedia broadcasting-ground (DMB-T), DMB-satellite (DMB-S), digital video Broadcast-hand-held (DVB-H), forward link media (MediaFLO@) Radio Data System, received terrestrial digital broadcasting integrated service Etc. (ISDB-T) digit broadcasting system receives digital broadcasting.Broadcasting reception module 111 may be constructed such that and be adapted to provide for extensively Broadcast the various broadcast systems and above-mentioned digit broadcasting system of signal.Via broadcasting reception module 111 receive broadcast singal and/ Or broadcast related information can be stored in memorizer 160 (or other types of storage medium).
Mobile communication module 112 sends radio signals to base station (for example, access point, node B etc.), exterior terminal And at least one of server and/or receive from it radio signal.Such radio signal can be logical including voice Words signal, video calling signal or the various types of data for sending and/or receiving according to text and/or Multimedia Message.
Wireless Internet module 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.The module can be internally or externally It is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by the module can including WLAN (WLAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave accesses), HSDPA (high-speed downlink packet access) etc..
Short range communication module 114 is the module for supporting junction service.Some examples of short-range communication technology include indigo plant ToothTM, RF identification (RFID), Infrared Data Association (IrDA), ultra broadband (UWB), purple honeybeeTMEtc..
Location information module 115 is the module for checking or obtaining the positional information of mobile terminal.Location information module Typical case be GPS (global positioning system).According to current technology, GPS module 115 is calculated from three or more satellites Range information and correct time information and for calculate Information application triangulation, so as to according to longitude, latitude Three-dimensional current location information is calculated highly accurately.Currently, defended using three for calculating the method for position and temporal information The error of star and the position that calculated by using other satellite correction and temporal information.Additionally, GPS module 115 Can be by Continuous plus current location information in real time come calculating speed information.
A/V input blocks 120 are used for receiving audio or video signal.A/V input blocks 120 can include 121 He of camera Mike 122, the static images that 121 pairs, camera is obtained by image capture apparatus in Video Capture pattern or image capture mode Or the view data of video is processed.Picture frame after process is may be displayed on display unit 151.Jing cameras 121 are processed Carry out sending out during picture frame afterwards can be stored in memorizer 160 (or other storage mediums) or via wireless communication unit 110 Send, two or more cameras 121 can be provided according to the construction of mobile terminal.Mike 122 can be in telephone calling model, note Sound (voice data) is received via mike in record pattern, speech recognition mode etc. operational mode, and can be by so Acoustic processing be voice data.Audio frequency (voice) data after process can be converted in the case of telephone calling model can The form output of mobile communication base station is sent to via mobile communication module 112.Mike 122 can implement various types of making an uproar Sound eliminates (or suppression) algorithm to eliminate the noise or dry that (or suppression) is produced during receiving and sending audio signal Disturb.
User input unit 130 can generate key input data to control each of mobile terminal according to the order of user input Plant operation.User input unit 130 allows the various types of information of user input, and can include keyboard, metal dome, touch Plate (for example, detection is due to the sensitive component of the change of touched and caused resistance, pressure, electric capacity etc.), roller, rocking bar etc. Deng.Especially, when touch pad is superimposed upon on display unit 151 in the form of layer, touch screen can be formed.
Sensing unit 140 detects the current state of mobile terminal 1 00, and (for example, mobile terminal 1 00 opens or closes shape State), the position of mobile terminal 1 00, user is for the presence or absence of contact (that is, touch input), the mobile terminal of mobile terminal 1 00 100 orientation, the acceleration or deceleration movement of mobile terminal 1 00 and direction etc., and generate for controlling mobile terminal 1 00 The order of operation or signal.For example, when mobile terminal 1 00 is embodied as sliding-type mobile phone, sensing unit 140 can be sensed The sliding-type phone is opened or is cut out.In addition, sensing unit 140 can detect power subsystem 190 whether provide electric power or Whether person's interface unit 170 is coupled with external device (ED).Sensing unit 140 can will be combined below including proximity transducer 141 Touch screen is being described to this.
Interface unit 170 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 1 00.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, memory card port, the port for device of the connection with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Identification module can be that storage uses each of mobile terminal 1 00 for verifying user Kind of information and subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) can be included Etc..In addition, the device with identification module (hereinafter referred to as " identifying device ") can take the form of smart card, therefore, know Other device can be connected with mobile terminal 1 00 via port or other attachment means.Interface unit 170 can be used for receive from The input (for example, data message, electric power etc.) of external device (ED) and the input for receiving is transferred in mobile terminal 1 00 One or more elements can be used for the transmission data between mobile terminal and external device (ED).
In addition, when mobile terminal 1 00 is connected with external base, interface unit 170 can serve as allowing to pass through which by electricity Power provides the path of mobile terminal 1 00 from base or can serve as allowing from base the various command signals being input into pass through which It is transferred to the path of mobile terminal.Can serve as recognizing that mobile terminal is from the various command signals of base input or electric power The no signal being accurately fitted within base.Output unit 150 is configured to provide defeated with vision, audio frequency and/or tactile manner Go out signal (for example, audio signal, video signal, alarm signal, vibration signal etc.).Output unit 150 can include showing Unit 151, dio Output Modules 152, alarm unit 153 etc..
The information that display unit 151 is processed in may be displayed on mobile terminal 1 00.For example, when mobile terminal 1 00 is in electricity During words call mode, display unit 151 can show and converse or other communicate (for example, text messaging, multimedia files Download etc.) related user interface (UI) or graphic user interface (GUI).When mobile terminal 1 00 is in video calling pattern Or during image capture mode, display unit 151 can show the image of capture and/or the image of reception, illustrate video or figure UI or GUI of picture and correlation function etc..
Meanwhile, when the display unit 151 and touch pad touch screen with formation superposed on one another in the form of layer, display unit 151 can serve as input equipment and output device.Display unit 151 can include liquid crystal display (LCD), thin film transistor (TFT) In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least It is a kind of.Some in these display may be constructed such that transparence to allow user from outside viewing, and this is properly termed as transparent Display, typical transparent display can be, for example, TOLED (transparent organic light emitting diode) display etc..According to specific The embodiment wanted, mobile terminal 1 00 can include two or more display units (or other display devices), for example, move Dynamic terminal can include outernal display unit (not shown) and inner display unit (not shown).Touch screen can be used for detection and touch Input pressure and touch input position and touch input area.
Dio Output Modules 152 can mobile terminal in call signal reception pattern, call mode, logging mode, It is when under the isotypes such as speech recognition mode, broadcast reception mode, that wireless communication unit 110 is received or in memorizer 160 The voice data transducing audio signal of middle storage and it is output as sound.And, dio Output Modules 152 can be provided and movement The audio output (for example, call signal receives sound, message sink sound etc.) of the specific function correlation that terminal 100 is performed. Dio Output Modules 152 can include speaker, buzzer etc..
Alarm unit 153 can provide output so that event is notified to mobile terminal 1 00.Typical event can be with Including calling reception, message sink, key signals input, touch input etc..In addition to audio or video is exported, alarm unit 153 can provide output in a different manner with the generation of notification event.For example, alarm unit 153 can be in the form of vibrating Output is provided, when calling, message or some other entrance communication (incomingcommunication) are received, alarm list Unit 153 can provide tactile output (that is, vibrating) to notify to user.Tactile output as by providing, even if When the mobile phone of user is in the pocket of user, user also can recognize that the generation of various events.Alarm unit 153 The output of the generation of notification event can be provided via display unit 151 or dio Output Modules 152.
Memorizer 160 can store software program for the process and control operation performed by controller 180 etc., Huo Zheke With the data (for example, telephone directory, message, still image, video etc.) for temporarily storing own Jing outputs or will export.And And, memorizer 160 can be storing the vibration of various modes with regard to exporting when touching and being applied to touch screen and audio signal Data.
Memorizer 160 can include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, many Media card, card-type memorizer (for example, SD or DX memorizeies etc.), random access storage device (RAM), static random-access storage Device (SRAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..And, mobile terminal 1 00 can perform memorizer with by network connection The network storage device cooperation of 160 store function.
The overall operation of the generally control mobile terminal of controller 180.For example, controller 180 is performed and voice call, data The related control of communication, video calling etc. and process.In addition, controller 180 can be included for reproducing (or playback) many matchmakers The multi-media module 181 of volume data, multi-media module 181 can be constructed in controller 180, or it is so structured that and control Device 180 is separated.Controller 180 can be with execution pattern identifying processing, by the handwriting input for performing on the touchscreen or picture Draw input and be identified as character or image.
Power subsystem 190 receives external power or internal power under the control of controller 180 and provides operation each unit Appropriate electric power needed for part and component.
Various embodiments described herein can be with use such as computer software, hardware or its any combination of calculating Machine computer-readable recording medium is implementing.For hardware is implemented, embodiment described herein can be by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can Programming gate array (FPGA), processor, controller, microcontroller, microprocessor, it is designed to perform function described herein At least one in electronic unit implementing, in some cases, can be implemented in controller 180 by such embodiment. For software is implemented, the embodiment of such as process or function can with allow to perform the single of at least one function or operation Software module is implementing.Software code can be come by the software application (or program) write with any appropriate programming language Implement, perform during software code can be stored in memorizer 160 and by controller 180.
So far, own Jing describes mobile terminal according to its function.Below, for the sake of brevity, will description such as folded form, Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc. is used as showing Example.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
As shown in Figure 1 mobile terminal 1 00 may be constructed such that using via frame or packet transmission data it is all if any Line and wireless communication system and satellite-based communication system are operating.
The communication system that mobile terminal wherein of the invention is operable to is described referring now to Fig. 2.
Such communication system can use different air interfaces and/or physical layer.For example, used by communication system Air interface includes such as frequency division multiple access (FDMA), time division multiple acess (TDMA), CDMA (CDMA) and universal mobile communications system System (UMTS) (especially, Long Term Evolution (LTE)), global system for mobile communications (GSM) etc..As non-limiting example, under The description in face is related to cdma communication system, but such teaching is equally applicable to other types of system.
With reference to Fig. 2, cdma wireless communication system can include multiple mobile terminal 1s 00, multiple base stations (BS) 270, base station Controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is configured to and Public Switched Telephony Network (PSTN) 290 form interface.MSC280 is also structured to form interface with the BSC275 that can be couple to base station 270 via back haul link. If back haul link can be constructed according to any one in the interface that Ganji knows, the interface includes such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that system can include multiple BSC2750 as shown in Figure 2.
Each BS270 can service one or more subregions (or region), by multidirectional antenna or the day of sensing specific direction Each subregion that line is covered is radially away from BS270.Or, each subregion can by for diversity reception two or more Antenna is covered.Each BS270 may be constructed such that the multiple frequency distribution of support, and each frequency distribution with specific frequency spectrum (for example, 1.25MHz, 5MHz etc.).
What subregion and frequency were distributed intersect can be referred to as CDMA Channel.BS270 can also be referred to as base station transceiver System (BTS) or other equivalent terms.In this case, term " base station " can be used for broadly representing single BSC275 and at least one BS270.Base station can also be referred to as " cellular station ".Or, each subregion of specific BS270 can be claimed For multiple cellular stations.
As shown in Figure 2, broadcast singal is sent to broadcsting transmitter (BT) 295 mobile terminal operated in system 100.Broadcasting reception module 111 is arranged at mobile terminal 1 00 to receive the broadcast sent by BT295 as shown in Figure 1 Signal.In fig. 2 it is shown that several global positioning system (GPS) satellite 300.Satellite 300 helps position multiple mobile terminals At least one of 100.
In fig. 2, multiple satellites 300 are depicted, it is understood that be, it is possible to use any number of satellite obtains useful Location information.GPS module 115 is generally configured to coordinate to obtain the positioning wanted letter with satellite 300 as shown in Figure 1 Breath.Substitute GPS tracking techniques or outside GPS tracking techniques, it is possible to use can track the position of mobile terminal other Technology.In addition, at least one gps satellite 300 can optionally or additionally process satellite dmb transmission.
Used as a typical operation of wireless communication system, BS270 receives the reverse link from various mobile terminal 1s 00 Signal.Mobile terminal 1 00 generally participates in call, information receiving and transmitting and other types of communication.Each of the reception of certain base station 270 is anti- Processed in specific BS270 to link signal.The data of acquisition are forwarded to the BSC275 of correlation.BSC provides call Resource allocation and the mobile management function of the coordination including the soft switching process between BS270.BSC275 is also by the number for receiving According to MSC280 is routed to, which provides the extra route service for forming interface with PSTN290.Similarly, PSTN290 with MSC280 forms interface, and MSC and BSC275 form interface, and BSC275 correspondingly controls BS270 with by forward link signals It is sent to mobile terminal 1 00.
Based on above-mentioned mobile terminal hardware configuration and communication system, the inventive method each embodiment is proposed.
As shown in figure 3, first embodiment of the invention proposes a kind of application source code guard method, including:
Application source code is split as tactic logical block by step S101.
Specifically, step S101, including:
Application source code is parsed, the execution logic of the program source code that is applied;
Application source code is split as by tactic logical block according to execution logic.
Step S102, carries out random disorder arrangement, and arranges for each logical block to tactic logical block One redirects mark.
Wherein, mark is redirected for identifying putting in order after the arrangement of logical block random disorder.
Redirect mark be arranged at corresponding logical block before, after corresponding logical block, before all logical blocks Or after all logical blocks.
Step S103, by all logical blocks and redirects mark and is converted to application program.
Specifically, step S103, including:
By all logical blocks and redirect mark and be converted to rearrangement source code;
Source code will be reset and be converted to application program.
As shown in figure 4, second embodiment of the invention proposes a kind of application source code guard method, including:
Step S201, carries out decompiling to application program, and be applied program source code.
Specifically, step S201, including:
Decompiling is carried out to application program, the application program original code of intermediate form is obtained.
For example, decompiling is carried out to the application program of the operating systems such as Android (ARIXTRA) or IOS, obtains intermediate form Application program original code.
Application source code is split as tactic logical block by step S202.
Specifically, step S202, including:
Application source code is parsed, the execution logic of the program source code that is applied;
Application source code is split as by tactic logical block according to execution logic.
For example, the source code of image procossing application program is parsed, the execution for obtaining image procossing application program is patrolled Volume;The source code of image procossing application program is split as by tactic patrolling according to the execution logic of image procossing application program Collect unit:M1、M2……MN
Wherein, N is the positive integer more than 1.
Step S203, carries out random disorder arrangement, and arranges for each logical block to tactic logical block One redirects mark.
Wherein, mark is redirected for identifying putting in order after the arrangement of logical block random disorder.
Redirect mark be arranged at corresponding logical block before, after corresponding logical block, before all logical blocks Or after all logical blocks.
For example:To logical block:M1, M2 ... MN carries out out of order arrangement, is arranged as MN-3、M2……MN-9,;And to each Logical block MiArrange one and redirect mark Zi, redirect mark ZiFor identifying logical block MiArrangement after random disorder arrangement Sequentially.
Wherein, i ∈ [1, N].
Wherein, redirect mark ZiIt is arranged at corresponding logical block MiBefore, corresponding logical block MiAfterwards, it is all to patrol Before collecting unit or after all logical blocks.
Step S204, by all logical blocks and redirects mark and is converted to application program.
Specifically, step S204, including:
By all logical blocks and redirect mark and be converted to rearrangement source code;
Source code will be reset and be converted to application program.
For example:By all logical blocks MiZ is identified with redirectingiSource code syntax rule conversion according to intermediate form is attached most importance to Row's source code;Source code will be reset application program is converted to according to the packing form of the application program before decompiling.
As shown in figure 5, the present invention further provides a kind of application source code protection device, including:
Module 162 is split, for application source code is split as tactic logical block.
Specifically, module 162 is split, including:
Parsing module 163, for parsing to application source code, the execution of the program source code that is applied is patrolled Volume;
Logic splits module 164, for application source code is split as tactic logic according to execution logic Unit.
Arrangement module 165, for carrying out random disorder arrangement to tactic logical block, and is each logic list Unit arranges one and redirects mark.
Wherein, mark is redirected for identifying putting in order after the arrangement of logical block random disorder.
Redirect mark be arranged at corresponding logical block before, after corresponding logical block, before all logical blocks Or after all logical blocks.
Modular converter 166, for by all logical blocks and redirecting mark and being converted to application program.
Specifically, modular converter 166, including:
Transcode module 167, for by all logical blocks and redirecting mark and being converted to rearrangement source code;
Packetization module 168, is converted to application program for will reset source code.
As shown in fig. 6, the present invention further provides a kind of application source code protection device, including:
Decompiling module 161, for carrying out decompiling to application program, be applied program source code.
Specifically, decompiling module 161, is used for:
Decompiling is carried out to application program, the application program original code of intermediate form is obtained.
For example, decompiling module 161, for carrying out instead to the application program of the operating systems such as Android (ARIXTRA) or IOS Compiling, obtains the application program original code of intermediate form.
Module 162 is split, for application source code is split as tactic logical block.
Specifically, module 162 is split, is used for:
Parsing module 163, for parsing to application source code, the execution of the program source code that is applied is patrolled Volume;
Logic splits module 164, for application source code is split as tactic logic according to execution logic Unit.
For example, parsing module 163, for parsing to the source code of image procossing application program, obtain image procossing The execution logic of application program;
Logic splits module 164, for the execution logic according to image procossing application program by image procossing application program Source code be split as tactic logical block:M1、M2……MN
Wherein, N is the positive integer more than 1.
Arrangement module 165, for carrying out random disorder arrangement to tactic logical block, and is each logic list Unit arranges one and redirects mark.
Wherein, mark is redirected for identifying putting in order after the arrangement of logical block random disorder.
Redirect mark be arranged at corresponding logical block before, after corresponding logical block, before all logical blocks Or after all logical blocks.
For example:Arrangement module 165, for logical block:M1, M2 ... MN carries out out of order arrangement, is arranged as MN-3、 M2……MN-9,;And to each logical block MiArrange one and redirect mark Zi, redirect mark ZiFor identifying logical block MiWith Putting in order after the out of order arrangement of machine.
Wherein, i ∈ [1, N].
Wherein, redirect mark ZiIt is arranged at corresponding logical block MiBefore, corresponding logical block MiAfterwards, it is all to patrol Before collecting unit or after all logical blocks.
Modular converter 166, for by all logical blocks and redirecting mark and being converted to application program.
Specifically, modular converter 166, are used for:
Transcode module 167, for by all logical blocks and redirecting mark and being converted to rearrangement source code;
Packetization module 168, is converted to application program for will reset source code.
For example:Transcode module 167, for by all logical blocks MiZ is identified with redirectingiAccording to the source of intermediate form Code syntax rule is converted into rearrangement source code;
Packetization module 168, for will reset source code according to the packing form of the application program before decompiling be converted to should Use program.
It should be noted that herein, term " including ", "comprising" or its any other variant are intended to non-row His property is included, so that a series of process, method, article or device including key elements not only include those key elements, and And also include other key elements being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element for being limited by sentence "including a ...", it is not excluded that including being somebody's turn to do Also there is other identical element in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words The part for going out contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), use so that a station terminal equipment including some instructions (can be mobile phone, computer, clothes Business device, air-conditioner, or network equipment etc.) perform method described in each embodiment of the invention.
The preferred embodiments of the present invention are these are only, the scope of the claims of the present invention is not thereby limited, it is every using this Equivalent structure or equivalent flow conversion that bright description and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of application source code protection device, it is characterised in that described device includes:
Module is split, for application source code is split as tactic logical block;
Arrangement module, for carrying out random disorder arrangement to the tactic logical block, and is each logical block Arrange one and redirect mark;It is described to redirect mark for identifying putting in order after the logical block random disorder arrangement;
Modular converter, for by all logical blocks and redirecting mark and being converted to application program.
2. device according to claim 1, it is characterised in that described device also includes:
Decompiling module, for carrying out decompiling to application program, be applied program source code, and by application source code Send to fractionation module.
3. device according to claim 1, it is characterised in that the fractionation module, specifically includes:
Parsing module, for parsing to application source code, the execution logic of the program source code that is applied;
Logic splits module, for application source code is split as tactic logic list according to the execution logic Unit.
4. device according to claim 1, it is characterised in that it is described redirect mark be arranged at corresponding logical block it Before, after corresponding logical block, before all logical blocks or after all logical blocks.
5. device according to claim 1, it is characterised in that the modular converter, specifically includes:
Transcode module, for by all logical blocks and redirecting mark and being converted to rearrangement source code;
Packetization module, for being converted to application program by the rearrangement source code.
6. a kind of application source code guard method, it is characterised in that the method comprising the steps of:
Application source code is split as into tactic logical block;
Carry out random disorder arrangement, and arrange one for each logical block redirecting mark to the tactic logical block Know;It is described to redirect mark for identifying putting in order after the logical block random disorder arrangement;
By all logical blocks and redirect mark and be converted to application program.
7. method according to claim 6, it is characterised in that the source code of application program is split as into order row described Before the logical block of row, methods described also includes:
Decompiling is carried out to application program, be applied program source code.
8. method according to claim 6, it is characterised in that it is described application source code is split as it is tactic Logical block, specifically includes:
Application source code is parsed, the execution logic of the program source code that is applied;
Application source code is split as by tactic logical block according to the execution logic.
9. method according to claim 6, it is characterised in that it is described redirect mark be arranged at corresponding logical block it Before, after corresponding logical block, before all logical blocks or after all logical blocks.
10. method according to claim 6, it is characterised in that described by all logical blocks and to redirect mark and be converted to Application program, specifically includes:
By all logical blocks and redirect mark and be converted to rearrangement source code;
The rearrangement source code is converted to into application program.
CN201610951990.6A 2016-10-27 2016-10-27 Device and method for protecting source code of application program Pending CN106529225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610951990.6A CN106529225A (en) 2016-10-27 2016-10-27 Device and method for protecting source code of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610951990.6A CN106529225A (en) 2016-10-27 2016-10-27 Device and method for protecting source code of application program

Publications (1)

Publication Number Publication Date
CN106529225A true CN106529225A (en) 2017-03-22

Family

ID=58325276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610951990.6A Pending CN106529225A (en) 2016-10-27 2016-10-27 Device and method for protecting source code of application program

Country Status (1)

Country Link
CN (1) CN106529225A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108363911A (en) * 2018-02-11 2018-08-03 西安四叶草信息技术有限公司 A kind of Python scripts obscure, the method and device of watermark
CN108415709A (en) * 2018-02-12 2018-08-17 北京梆梆安全科技有限公司 A kind of method and device for reinforcing source code based on finite state machine
CN108416191A (en) * 2018-02-12 2018-08-17 北京梆梆安全科技有限公司 The method and device of source code is reinforced based on opaque predicate and finite state machine
CN108446541A (en) * 2018-02-12 2018-08-24 北京梆梆安全科技有限公司 Source code reinforcement means and device based on finite state machine and semiology analysis
CN108446536A (en) * 2018-02-12 2018-08-24 北京梆梆安全科技有限公司 A kind of source code reinforcement means and device based on semiology analysis and single-point logic
CN108446535A (en) * 2018-02-12 2018-08-24 北京梆梆安全科技有限公司 Source code reinforcement means based on code execution sequence and device
CN108446538A (en) * 2018-02-12 2018-08-24 北京梆梆安全科技有限公司 Source code reinforcement means and device based on state, semiology analysis and single-point logic
CN108460253A (en) * 2018-02-12 2018-08-28 北京梆梆安全科技有限公司 Source code reinforcement means and device based on sequence, semiology analysis and single-point logic
CN108509772A (en) * 2018-02-12 2018-09-07 北京梆梆安全科技有限公司 Source code reinforcement means and device based on execution sequence and single-point logic
CN108537012A (en) * 2018-02-12 2018-09-14 北京梆梆安全科技有限公司 Source code based on variable and code execution sequence obscures method and device
CN109711118A (en) * 2018-12-29 2019-05-03 上海上讯信息技术股份有限公司 A kind of iOS safe compiler and safe Compilation Method based on plug-in unit

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101939749A (en) * 2008-02-11 2011-01-05 Nxp股份有限公司 Method of program obfuscation and processing device for executing obfuscated programs
CN103778355A (en) * 2014-01-15 2014-05-07 西北大学 Code morphing-based binary code obfuscation method
CN104517044A (en) * 2013-09-27 2015-04-15 腾讯科技(深圳)有限公司 Method and device for protecting binary file from being decompiled
CN104866734A (en) * 2014-02-25 2015-08-26 北京娜迦信息科技发展有限公司 DEX (Dalvik VM executes) file protecting method and device
CN105354009A (en) * 2015-10-14 2016-02-24 北京深思数盾科技有限公司 Protection method for firmware

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101939749A (en) * 2008-02-11 2011-01-05 Nxp股份有限公司 Method of program obfuscation and processing device for executing obfuscated programs
CN104517044A (en) * 2013-09-27 2015-04-15 腾讯科技(深圳)有限公司 Method and device for protecting binary file from being decompiled
CN103778355A (en) * 2014-01-15 2014-05-07 西北大学 Code morphing-based binary code obfuscation method
CN104866734A (en) * 2014-02-25 2015-08-26 北京娜迦信息科技发展有限公司 DEX (Dalvik VM executes) file protecting method and device
CN105354009A (en) * 2015-10-14 2016-02-24 北京深思数盾科技有限公司 Protection method for firmware

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108363911A (en) * 2018-02-11 2018-08-03 西安四叶草信息技术有限公司 A kind of Python scripts obscure, the method and device of watermark
CN108363911B (en) * 2018-02-11 2021-10-29 西安四叶草信息技术有限公司 Python script obfuscating and watermarking method and device
CN108446536A (en) * 2018-02-12 2018-08-24 北京梆梆安全科技有限公司 A kind of source code reinforcement means and device based on semiology analysis and single-point logic
CN108537012A (en) * 2018-02-12 2018-09-14 北京梆梆安全科技有限公司 Source code based on variable and code execution sequence obscures method and device
CN108416191A (en) * 2018-02-12 2018-08-17 北京梆梆安全科技有限公司 The method and device of source code is reinforced based on opaque predicate and finite state machine
CN108446535A (en) * 2018-02-12 2018-08-24 北京梆梆安全科技有限公司 Source code reinforcement means based on code execution sequence and device
CN108446538A (en) * 2018-02-12 2018-08-24 北京梆梆安全科技有限公司 Source code reinforcement means and device based on state, semiology analysis and single-point logic
CN108460253A (en) * 2018-02-12 2018-08-28 北京梆梆安全科技有限公司 Source code reinforcement means and device based on sequence, semiology analysis and single-point logic
CN108509772A (en) * 2018-02-12 2018-09-07 北京梆梆安全科技有限公司 Source code reinforcement means and device based on execution sequence and single-point logic
CN108446541A (en) * 2018-02-12 2018-08-24 北京梆梆安全科技有限公司 Source code reinforcement means and device based on finite state machine and semiology analysis
CN108509772B (en) * 2018-02-12 2022-01-07 北京梆梆安全科技有限公司 Source code reinforcement method and device based on execution sequence and single-point logic
CN108446538B (en) * 2018-02-12 2020-02-07 北京梆梆安全科技有限公司 Source code reinforcing method and device based on state, symbolic execution and single-point logic
CN108415709A (en) * 2018-02-12 2018-08-17 北京梆梆安全科技有限公司 A kind of method and device for reinforcing source code based on finite state machine
CN108446541B (en) * 2018-02-12 2021-10-29 北京梆梆安全科技有限公司 Source code reinforcing method and device based on finite-state machine and symbol execution
CN108446535B (en) * 2018-02-12 2021-11-12 北京梆梆安全科技有限公司 Source code reinforcement method and device based on code execution sequence
CN108537012B (en) * 2018-02-12 2021-11-16 北京梆梆安全科技有限公司 Source code obfuscation method and device based on variables and code execution sequence
CN108416191B (en) * 2018-02-12 2021-11-19 北京梆梆安全科技有限公司 Method and device for reinforcing source code based on opaque predicate and finite state machine
CN109711118A (en) * 2018-12-29 2019-05-03 上海上讯信息技术股份有限公司 A kind of iOS safe compiler and safe Compilation Method based on plug-in unit

Similar Documents

Publication Publication Date Title
CN106529225A (en) Device and method for protecting source code of application program
CN106155694A (en) A kind of application and the display packing and device applied of attending to anything else
CN104951229B (en) Screenshot method and device
CN106843723A (en) A kind of application program associates application method and mobile terminal
CN106793159A (en) A kind of screen prjection method and mobile terminal
CN106095464A (en) A kind of method and device of the seamless operation of application program
CN107071161A (en) The aggregation display method and mobile terminal of icon in a kind of status bar
CN106993084A (en) The method, device and mobile terminal that a kind of control information is shown
CN106485163A (en) Control method and control device that mobile terminal data storehouse accesses
CN104915230B (en) application control method and device
CN106227454B (en) A kind of touch trajectory detection system and method
CN107249072A (en) Mobile terminal and its chain operation start method
CN106951350A (en) The inspection method and device of a kind of mobile terminal disk
CN106454771A (en) Information sending method and device and terminal
CN106254522A (en) A kind of based terminal system, method and terminal
CN106777251A (en) A kind of file management method and device
CN106792644A (en) Mobile terminal, server and information processing method
CN106385494A (en) Method and device for obtaining dynamic home page of mobile terminal application
CN106534498A (en) Control device and method of application folder and mobile terminal
CN106131318A (en) A kind of incoming information hidden method and device
CN106713645A (en) Method of controlling loudspeaker playing and mobile terminal
CN106897135A (en) Restoration methods and device after a kind of application interruption
CN106843734A (en) The multi-functional treating method and apparatus of one species pressure sensitivity button
CN106896988A (en) Application icon alignment means, terminal and method
CN106535196A (en) Routing equipment, terminal and method for controlling WiFi access

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170322