CN103500295A - Method preventing copying of source codes by identifying ID dynamically - Google Patents

Method preventing copying of source codes by identifying ID dynamically Download PDF

Info

Publication number
CN103500295A
CN103500295A CN201310470089.3A CN201310470089A CN103500295A CN 103500295 A CN103500295 A CN 103500295A CN 201310470089 A CN201310470089 A CN 201310470089A CN 103500295 A CN103500295 A CN 103500295A
Authority
CN
China
Prior art keywords
function
source code
static
link library
thread
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
CN201310470089.3A
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.)
Shanghai Publishing and Printing College
University of Shanghai for Science and Technology
Original Assignee
Shanghai Publishing and Printing College
University of Shanghai for Science and Technology
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 Shanghai Publishing and Printing College, University of Shanghai for Science and Technology filed Critical Shanghai Publishing and Printing College
Priority to CN201310470089.3A priority Critical patent/CN103500295A/en
Publication of CN103500295A publication Critical patent/CN103500295A/en
Pending legal-status Critical Current

Links

Images

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/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code

Abstract

The invention discloses a method preventing copying of source codes by identifying an ID dynamically and is suitable for preventing copying of the computer program source code and the mobile equipment terminal source code. The method comprises the steps of setting up a static link library project, creating thread functions capable of deleting a copied source code in the link library project according to the ID of computer hardware, setting a variable to monitor whether a thread operates, transplanting the function low in coupling degree and capable of being executed in the whole code project to the static link library project, associating starting of the functions with the variable monitoring operation of the thread, compiling the static link library project for generating an LIB file, adding the LIB file to the whole code project, declaring the packaging function, deleting the original realized section of the packaging function and compiling the source code project directly, and therefore the copy prevention function of the source codes can be achieved.

Description

A kind of method that prevents the source code copy by Dynamic Recognition ID
Technical field
The present invention relates to the computer security technique field, specifically, specially refer to a kind of method that prevents the source code copy by Dynamic Recognition ID.
Background technology
Along with the develop rapidly of network technology, the anti-copy technology seems more and more important, in nearly all corporate lan, all the anti-copy monitoring software can be installed.
Current anti-copy technology generally has two kinds.The first is to carry out the monitor copy situation by monitoring software is installed.The second is to prevent that by encryption other people from copying.The defect of first method is: if there is the people to start computing machine by other operating system is installed, monitoring software just can not start, and just can freely copy.The defect of second method is: if there is the people to know encipher-decipher method, just can lightheartedly copy.
Source code is exactly the basic of company (particularly some software companys), is the achievement of employee's dint of hard work work; If the technology source code, to outward leakage, will bring massive losses to company.
Summary of the invention
The technical matters that actual needs of the present invention solves is: for deficiency of the prior art, a kind of method that prevents the source code copy by Dynamic Recognition ID is provided, by current hardware device ID and given hardware device ID are compared, if it is not identical, delete the source code in current device, thereby realize preventing that source code is by illegal copies, reduced source code and transplanted the risk of illegal use by other people.
Technical matters solved by the invention can realize by the following technical solutions:
A kind of method that prevents the source code copy by Dynamic Recognition ID, it is characterized in that: described method comprises the steps:
1) model static link library engineering, and create the detection thread function for detection of hardware device ID in the static link library engineering, described detection thread function can realize when hardware device ID does not mate, and deletes the function of the source code in hardware device;
2) static state or global variable are set and whether detect described detection thread function in operation, the initialize of described static state or global variable is false;
3) degree of coupling in source code is low and public function that can carry out is transplanted in static link library, then associated with static variable at these public functions; When the value of static variable is false, the start detection thread function is true by the static variable assignment simultaneously, to realize thread monitoring function, only moves once;
4) finally compile the static link library engineering and generate the LIB library file, and the LIB library file is added in source code, statement encapsulation function, delete and encapsulate the original part that realizes of function, and the direct compilation source code realizes the copy-proof function of source code.
Further, but the identification id with uniqueness of described hardware device ID for being formed by CPU sequence number, hard disk sequence number, MAC Address of Network Card, the domain-name information of equipment.
Compared with prior art, beneficial effect of the present invention is as follows:
1. disguised high, by create the detection thread function for detection of hardware device ID in the static link library engineering, make the stranger can't wipe easily feel.
2. security is good, but the identification id with uniqueness that hardware device ID forms for CPU sequence number, hard disk sequence number, MAC Address of Network Card, domain-name information by equipment, the illegal copies that can effectively prevent.
The accompanying drawing explanation
Fig. 1 is the logical diagram that prevents the method for source code copy of the present invention.
Embodiment
For technological means, creation characteristic that the present invention is realized, reach purpose and effect is easy to understand, below in conjunction with embodiment, further set forth the present invention.
The present invention of the present invention a kind ofly prevents by Dynamic Recognition computer hardware equipment ID the method that source code is copied.Model static link library engineering, and create in the chained library engineering and can delete the thread function of source code that is copied according to computer hardware ID, and static state of definition is set or whether global variable monitors thread in operation, initialize is false; Then and function that can carry out low the degree of coupling in whole code engineering is transplanted in the static link library engineering, and according to the thread operational monitoring variable arranged, be false in the beginning of these functions, start thread monitoring function, and be thread operational monitoring variable set up true, to guarantee thread monitoring function, only move once just much of that; Finally compile the static link library engineering and generate the LIB library file, and the LIB library file is added to a whole set of code engineering, statement encapsulation function, delete and encapsulate the original part that realizes of function, and direct compilation source code engineering can be accomplished the copy-proof function of source code.
In detecting thread function, static variable gRunning is set and records and detect thread function and whether move, moving thread function and returning if detect thread function; Do not move if detect thread function, detect the ID that thread function starts to read LAN (Local Area Network) main frame given hardware device, compare with the ID of appointment, if mate thread function end of run; If LAN is obstructed or LAN (Local Area Network) host hardware device id does not mate, continue to read the ID comparison of local working computer hardware device ID and appointment, if mate thread function end of run; If do not mate, the local working computer memory device of thread function autoscan, destroy the memory device source code that is copied.Said method is applicable to compile the source code that result is computer executable program.If the compiling result is the target program of mobile terminal, above-mentioned thought can be applied to improve original program compiler, making compilation of source code depend on improved program compiler gets final product, that is to say by improved program compiler and work in this locality on computing machine and move, reach dynamic monitoring identification computer hardware equipment ID or LAN (Local Area Network) host hardware device id, thereby realize destroying the purpose that ID does not mate on the working computer memory device source code that is copied.
Embodiment
Referring to Fig. 1, the specific embodiment of the invention step is as follows:
101 steps are set up static link library engineering COMMONLIB;
102 steps create computer hardware ID and detect thread function IDJCTF, when this function can realize that ID does not mate, and the delete function of the source code that is copied;
Whether 103 steps arrange static variable gRunning and record and detect thread function and move, and the tax initial value is false;
104 steps are transplanted to COMMONLIB by the low function of the degree of coupling that must run in a whole set of source code engineering (might as well be designated as ZTYDMGC), these functions might as well be designated as CF1, CF2, CF3 ...;
105 steps are at function CFn(n=1, and 2,3 ...) to start to add code: IF(gRunning be false) { creating Thread Id JCTF:gRunning assignment is true; ;
106 step compiling engineering COMMONLIB generate the LIB file, might as well be designated as: COMMONLIB.LIB;
107 steps add COMMONLIB.LIB in engineering ZTYDMGC, and make function CFn(n=1, and 2,3 ...) statement, originally the CFn function is realized all deletions of part, direct compilation ZTYDMGC can realize copy-proof function.
Above demonstration and described ultimate principle of the present invention and principal character and advantage of the present invention.The technician of the industry should understand; the present invention is not restricted to the described embodiments; that in above-described embodiment and instructions, describes just illustrates principle of the present invention; without departing from the spirit and scope of the present invention; the present invention also has various changes and modifications, and these changes and improvements all fall in the claimed scope of the invention.The claimed scope of the present invention is defined by appending claims and equivalent thereof.

Claims (2)

1. a method that prevents the source code copy by Dynamic Recognition ID, is characterized in that, described method comprises the steps:
1) model static link library engineering, and create the detection thread function for detection of hardware device ID in the static link library engineering, described detection thread function can realize when hardware device ID does not mate, and deletes the function of the source code in hardware device;
2) static state or global variable are set and whether detect described detection thread function in operation, the initialize of described static state or global variable is false;
3) degree of coupling in source code is low and public function that can carry out is transplanted in static link library, then associated with static variable at these public functions; When the value of static variable is false, the start detection thread function is true by the static variable assignment simultaneously, to realize thread monitoring function, only moves once;
4) finally compile the static link library engineering and generate the LIB library file, and the LIB library file is added in source code, statement encapsulation function, delete and encapsulate the original part that realizes of function, and the direct compilation source code realizes the copy-proof function of source code.
2. the method that prevents source code copy by Dynamic Recognition ID according to claim 1, it is characterized in that, but the identification id with uniqueness that described hardware device ID forms for CPU sequence number, hard disk sequence number, MAC Address of Network Card, domain-name information by equipment.
CN201310470089.3A 2013-10-10 2013-10-10 Method preventing copying of source codes by identifying ID dynamically Pending CN103500295A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310470089.3A CN103500295A (en) 2013-10-10 2013-10-10 Method preventing copying of source codes by identifying ID dynamically

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310470089.3A CN103500295A (en) 2013-10-10 2013-10-10 Method preventing copying of source codes by identifying ID dynamically

Publications (1)

Publication Number Publication Date
CN103500295A true CN103500295A (en) 2014-01-08

Family

ID=49865503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310470089.3A Pending CN103500295A (en) 2013-10-10 2013-10-10 Method preventing copying of source codes by identifying ID dynamically

Country Status (1)

Country Link
CN (1) CN103500295A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113032286A (en) * 2021-05-24 2021-06-25 连连(杭州)信息技术有限公司 Code quality scanning method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826014A (en) * 2010-04-20 2010-09-08 北京邮电大学 Dividing method of source code in software engineering
CN102207884A (en) * 2011-06-02 2011-10-05 深圳市茁壮网络股份有限公司 File compiling method and device
CN102567659A (en) * 2010-12-28 2012-07-11 河南省躬行信息科技有限公司 File security active protection method based on double-drive linkage
US20130185696A1 (en) * 2012-01-16 2013-07-18 International Business Machines Corporation Manipulating source code patches

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826014A (en) * 2010-04-20 2010-09-08 北京邮电大学 Dividing method of source code in software engineering
CN102567659A (en) * 2010-12-28 2012-07-11 河南省躬行信息科技有限公司 File security active protection method based on double-drive linkage
CN102207884A (en) * 2011-06-02 2011-10-05 深圳市茁壮网络股份有限公司 File compiling method and device
US20130185696A1 (en) * 2012-01-16 2013-07-18 International Business Machines Corporation Manipulating source code patches

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
孔祥军: "基于物理磁盘的源码防拷贝的设计", 《大众科技》 *
彭军波: "如何利用Visual C++的API函数实现程序的自动删除", 《中国科技博览》 *
黄福员: "MD5加密算法及磁盘ID在ASP源码防拷贝中的应用", 《福建电脑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113032286A (en) * 2021-05-24 2021-06-25 连连(杭州)信息技术有限公司 Code quality scanning method and device and storage medium

Similar Documents

Publication Publication Date Title
KR101518420B1 (en) Apparatus and method for managing apk file in a android platform
US9852289B1 (en) Systems and methods for protecting files from malicious encryption attempts
EP3528149B1 (en) Software repackaging prevention method and device
JP2018073423A (en) File-modifying malware detection
US10079835B1 (en) Systems and methods for data loss prevention of unidentifiable and unsupported object types
US10586026B2 (en) Simple obfuscation of text data in binary files
CN103631904B (en) System and method for selecting synchronous or asynchronous file access method during antivirus analysis
CN108763951B (en) Data protection method and device
CN106778100B (en) Obfuscation compiling method and obfuscation compiler based on android platform and IOS platform
CN105718825A (en) Method and device for detecting malicious USB equipment
CN105260654A (en) Verification method for own integrity of software system
US20140325409A1 (en) Active & Efficient Monitoring of a Graphical User Interface
CN103473501A (en) Malware tracking method based on cloud safety
WO2022078366A1 (en) Application protection method and apparatus, device and medium
US9519780B1 (en) Systems and methods for identifying malware
CN105760761A (en) Software behavior analyzing method and device
CN103714269A (en) Virus identification method and device
CN112632536B (en) Memory loading method based on PE file transformation
KR102308477B1 (en) Method for Generating Information of Malware Which Describes the Attack Charateristics of the Malware
CN105453104B (en) System protection file security control device and management method
CN103500295A (en) Method preventing copying of source codes by identifying ID dynamically
CN112257037A (en) Process watermarking method and system and electronic equipment
Petkovic et al. A host based method for data leak protection by tracking sensitive data flow
CN103051608B (en) A kind of method and apparatus of movable equipment access monitoring
KR102203200B1 (en) Apparatus for deobfuscation and method for the same

Legal Events

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

Application publication date: 20140108

RJ01 Rejection of invention patent application after publication