WO2021068519A1 - Software anti-cracking method, device, apparatus and medium - Google Patents

Software anti-cracking method, device, apparatus and medium Download PDF

Info

Publication number
WO2021068519A1
WO2021068519A1 PCT/CN2020/092844 CN2020092844W WO2021068519A1 WO 2021068519 A1 WO2021068519 A1 WO 2021068519A1 CN 2020092844 W CN2020092844 W CN 2020092844W WO 2021068519 A1 WO2021068519 A1 WO 2021068519A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration data
data
target
encrypted
software
Prior art date
Application number
PCT/CN2020/092844
Other languages
French (fr)
Chinese (zh)
Inventor
李松
李锋
刘程程
Original Assignee
山东英信计算机技术有限公司
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 山东英信计算机技术有限公司 filed Critical 山东英信计算机技术有限公司
Publication of WO2021068519A1 publication Critical patent/WO2021068519A1/en

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Definitions

  • This application relates to the technical field of software management, and in particular to a software anti-cracking method, device, equipment, and medium.
  • the purpose of this application is to provide a software anti-cracking method, device, equipment, and medium, which can prevent the software from being cracked, thereby avoiding the software from being used illegally.
  • the specific plan is as follows:
  • this application discloses a software anti-cracking method applied to a preset system embedded in target software, including:
  • the encrypted changed configuration data is for activating the target software with an activation code
  • the original configuration data obtained after encryption is the data obtained after encryption
  • the encrypted original configuration data in the backup file list is the encrypted original configuration data stored in the backup file list according to the fragmented storage method in advance
  • the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data
  • the target software is prohibited from being activated, and the target software is required to be reactivated.
  • the obtaining the change configuration data formed by the normal operation of the target software includes:
  • the set interface in the preset system is used to obtain the changed configuration data formed by the normal operation of the activated target software.
  • said using the encrypted changed configuration data to update the original encrypted configuration data stored in advance in the target database and the backup file list includes:
  • the encrypting the changed configuration data to obtain the encrypted changed configuration data includes:
  • the asymmetric encryption algorithm is used to encrypt the changed configuration data to obtain the encrypted changed configuration data.
  • the method before acquiring the changed configuration data formed by the normal operation of the target software, the method further includes:
  • the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored in the target file addresses.
  • using the random number to determine a target file address for storing the encrypted original configuration data from the backup distributed redundant encrypted file list includes:
  • n represents the number of the target addresses
  • M represents the random number
  • N represents the total number of file addresses in the backup file list
  • % represents the remainder operation.
  • the comparing the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list includes :
  • the first decrypted data and the second decrypted data are compared.
  • this application discloses a software anti-cracking device, including:
  • the data acquisition module is used to acquire the changed configuration data formed by the normal operation of the target software
  • An encryption module for encrypting the changed configuration data to obtain the encrypted changed configuration data
  • the data update module is configured to use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list; wherein the encrypted original configuration data is for activating the target software with an activation code
  • the original configuration data obtained after encryption is the data obtained after encryption
  • the encrypted original configuration data in the backup file list is the encrypted configuration data stored in the backup file list in advance according to the fragmented storage mode, and,
  • the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data;
  • a data comparison module configured to compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list;
  • the activation control module is configured to prohibit activation of the target software when the first decrypted data is different from the second decrypted data, and require the target software to be reactivated.
  • this application discloses a software anti-cracking device, including:
  • the memory is used to store a computer program
  • the processor is used to execute the computer program to implement the software anti-cracking method disclosed above.
  • the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the software anti-cracking method disclosed above.
  • this application first obtains the change configuration data formed by the normal operation of the target software after activation; encrypts the change configuration data to obtain the encrypted change configuration data; uses the encrypted change configuration data to update the target database And the encrypted original configuration data pre-stored in the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is obtained by encrypting the original configuration data obtained after activating the target software with the activation code Data, the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in a slice storage manner in advance, and the total number of file addresses in the backup file list Is greater than the number of file fragments corresponding to the original configuration data after encryption; the first decrypted data corresponding to the updated configuration data in the target database and the first decrypted data corresponding to the updated configuration data in the backup file list The two decrypted data are compared; if the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software
  • this application first obtains the changed configuration data formed by the normal operation of the target software, and encrypts it to update the encrypted original configuration data pre-stored in the target database and the backup file list, and compare it with the target database The first decrypted data corresponding to the updated configuration data and the second decrypted data corresponding to the updated configuration data in the backup file list. If the first decrypted data and the second decrypted data are not the same, it means that all The configuration data in the target database or the backup file list is modified, which will cause the target software to be cracked. Therefore, it is forbidden to activate the target software and require the target software to be reactivated, which can prevent the software from being cracked. Avoid software being used illegally.
  • FIG. 1 is a flowchart of a software anti-cracking method disclosed in this application.
  • FIG. 2 is a flowchart of a specific software anti-cracking method disclosed in this application.
  • FIG. 3 is a flowchart of a specific software anti-cracking method disclosed in this application.
  • Figure 4 is a schematic diagram of the application of a software anti-cracking method disclosed in this application.
  • FIG. 5 is a schematic structural diagram of a software anti-cracking device disclosed in this application.
  • Fig. 6 is a structural diagram of a software anti-cracking device disclosed in this application.
  • the embodiment of the present application discloses a software anti-cracking method. As shown in FIG. 1, it is applied to a preset system embedded in target software, and the method includes:
  • Step S11 Obtain the changed configuration data formed by the normal operation of the target software after activation.
  • the preset system is a set of programs embedded in the target software. During the normal operation of the target software, part of the configuration data will change accordingly. Therefore, it is necessary to obtain the change configuration data formed by the normal operation of the target software.
  • the change configuration data may be a comparison between the changeable configuration data and the changeable configuration data.
  • the changed configuration data includes but is not limited to target software version data, activation code expiration time data, machine code data corresponding to the machine on which the target software is installed, random numbers with a preset length, and The number of devices installed by the target software, activation time data, and parity data.
  • Step S12 Encrypt the changed configuration data to obtain the encrypted changed configuration data.
  • the change configuration data is encrypted to obtain the encrypted change configuration data.
  • the encrypting the changed configuration data to obtain the encrypted changed configuration data includes: encrypting the changed configuration data using an asymmetric encryption algorithm to obtain the encrypted changed configuration data.
  • an asymmetric encryption algorithm is used to encrypt the changed configuration data, the keys used in the encryption and decryption process are different. To complete the normal encryption and decryption process, they must be paired and used, which can enhance data security and reduce The probability of configuration data being rewritten reduces the possibility of target software being cracked.
  • encrypting the changed configuration data to obtain the encrypted changed configuration data includes: encrypting the changed configuration data using a symmetric encryption algorithm to obtain the encrypted changed configuration data.
  • the symmetric encryption algorithm is used to encrypt the changed configuration data, the key used for encryption and decryption is the same key. Compared with the asymmetric encryption algorithm, the symmetric encryption algorithm has faster encryption and decryption speed, but the security is relatively lower.
  • Step S13 Use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein, the encrypted original configuration data is for the activation of the original configuration data using the activation code.
  • the original configuration data obtained after the target software is encrypted, and the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in advance according to the slice storage method And, the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data.
  • the encrypted original configuration data stored in advance in the updated target database and the backup file list is obtained after the encrypted changed configuration data; wherein, the encrypted original configuration data is Data obtained by encrypting the original configuration data obtained after activating the target software with an activation code, and the encrypted original configuration data in the backup file list is stored in the backup file list in advance according to a fragmented storage method And the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data.
  • the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the target data, so that the outside world cannot determine under which file addresses the file fragments corresponding to the original configuration data after encryption are stored, or the current file fragments. Which specific configuration data is displayed reduces the probability of the target software being cracked and improves the security of the target software.
  • the encrypted original configuration data in the target database is replaced with the encrypted changed configuration data to obtain the updated configuration data in the target database, and according to The number of file fragments of the encrypted original configuration data pre-stored in the backup file list, the encrypted changed configuration data is divided into corresponding number of file fragments, and the encrypted original configuration data is stored in advance according to the number of file fragments.
  • the target file address or target file name of the file segment of the data is replaced with the encrypted file segment of the changed configuration data for the corresponding file segment of the original configuration data after encryption to obtain the updated configuration data in the backup file list.
  • the fragmented storage mode is a storage mode in which the encrypted original configuration data is divided into a certain number of file fragments and then stored.
  • the encrypted original configuration data is encrypted original configuration data
  • the encrypted original configuration data includes but is not limited to the target software version data, the activation code expiration time data, and the machine code Data, the random number, the number of devices, the activation time data, and the parity data.
  • the activation code expiration time data represents the expiration time of the activation code
  • the expiration time can be given by the specific year, month and day of the expiration, for example, January 1, 2020, or can be given by the validity period, for example, valid The duration is 2 years.
  • Step S14 Compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list.
  • the configuration data corresponding to the target software may be modified by hackers to illegally use the target software. Therefore, the updated configuration in the target database needs to be modified.
  • the first configuration data corresponding to the data is compared with the second decrypted data corresponding to the updated configuration data in the backup file list to determine whether the first decrypted data and the second decrypted data are the same, so as to determine Whether the configuration data in the target database or the backup folder is illegally modified. If the first decrypted data is different from the second decrypted data, the configuration data in the target database or the backup file list has been illegally modified.
  • the encrypted configuration data stored in the target database and the backup file list includes parity data, when any one of the backup file lists stores the file corresponding to the encrypted configuration data
  • the parity data and the remaining file fragments can be used to restore the modified file fragment without causing the first decrypted data and the second decrypted data to be different.
  • the encrypted configuration data cannot be restored, which will cause the first decrypted data and The second decrypted data is different. Since the set interface in the preset system is not open to users, there is no configuration data in the target software that can be illegally modified and belongs to the encrypted configuration data.
  • Step S15 If the first decrypted data is not the same as the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated.
  • the target software when the first decrypted data is different from the second decrypted data, the target software is forbidden to be activated, and the target software is required to be reactivated; when the first decrypted data is different from the second decrypted data, When the second decrypted data is the same, the target software is controlled to run normally.
  • this application first obtains the change configuration data formed by the normal operation of the target software after activation; encrypts the change configuration data to obtain the encrypted change configuration data; uses the encrypted change configuration data to update the target database And the encrypted original configuration data pre-stored in the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is obtained by encrypting the original configuration data obtained after activating the target software with the activation code Data, the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in a slice storage manner in advance, and the total number of file addresses in the backup file list Is greater than the number of file fragments corresponding to the original configuration data after encryption; the first decrypted data corresponding to the updated configuration data in the target database and the first decrypted data corresponding to the updated configuration data in the backup file list The two decrypted data are compared; if the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software
  • this application first obtains the changed configuration data formed by the normal operation of the target software, and encrypts it to update the encrypted original configuration data pre-stored in the target database and the backup file list, and compare it with the target database The first decrypted data corresponding to the updated configuration data and the second decrypted data corresponding to the updated configuration data in the backup file list. If the first decrypted data and the second decrypted data are not the same, it means that all The configuration data in the target database or the backup file list is modified, which will cause the target software to be cracked. Therefore, it is forbidden to activate the target software and require the target software to be reactivated, which can prevent the software from being cracked. Avoid software being used illegally.
  • the embodiment of the present application discloses a specific software anti-cracking method, which is applied to a preset system embedded in target software, and the method includes:
  • Step S21 Use the set interface in the preset system to obtain the changed configuration data formed by the normal operation of the activated target software.
  • the preset system includes two interfaces connecting the target software, namely, a set interface and a get interface.
  • the set interface is used to obtain the changed configuration data formed by the normal operation of the activated target software.
  • the set interface obtains the change configuration data formed by the normal operation of the target software in the plaintext mode of Map ⁇ String, String>, and then calculates the ciphertext through an encryption algorithm.
  • Step S22 Encrypt the changed configuration data to obtain the encrypted changed configuration data.
  • Step S23 Use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein, the encrypted original configuration data is for the activation of the original configuration data using the activation code.
  • the original configuration data obtained after the target software is encrypted, and the encrypted original configuration data in the backup file list is the encrypted original configuration data stored in the backup file list in advance according to the slice storage method Data, and the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data.
  • Step S24 Use the get interface in the preset system to read the encrypted original configuration data from the target database and the backup file list respectively, and decrypt it, and obtain the first decrypted data and the second decrypted data correspondingly. Decrypt the data.
  • Step S25 Compare the first decrypted data with the second decrypted data.
  • the get interface provides a Map ⁇ String, String> interface to the target software.
  • the get interface is used to read the updated configuration data from the target database and the backup file list respectively, and decrypt it, and correspondingly obtain the first decrypted data and the second decrypted data.
  • the first decrypted data and the second encrypted data are compared to determine whether the first decrypted data and the second decrypted data are the same, so as to determine all the items in the target database or the backup file list. Whether the configuration data is illegally modified after encryption.
  • Step S26 If the first decrypted data is not the same as the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated.
  • the embodiment of the present application discloses a specific software anti-cracking method, which is applied to a preset system embedded in target software, and the method includes:
  • Step S31 Use the activation code to activate the target software to obtain the original configuration data of the target software.
  • Step S32 Encrypt the original configuration data to obtain the original configuration data after encryption.
  • the activation code is generated by the operator of the target software using an activation code generation system.
  • the activation code generation system is used to generate an activation code.
  • the operator of the target software generates a serial number only for this user according to the user's purchase order, and then uses the activation code generation system to combine the serial number with the machine on which the target software is installed
  • the code generates an activation code.
  • the activation code includes, but is not limited to, the target software version data, the activation code expiration time, the machine code, and the random number. Different data are separated by English commas.
  • the target software After obtaining the activation code, the target software uses the preset system to decrypt the activation code, and determines whether the activation code has expired according to the activation code expiration time, and if the activation code has expired, Then the target software cannot be activated, and if the activation code is not invalid, the target software is activated.
  • the activation code expiration time is given by a specific year, month, and day
  • the preset system reads the motherboard time of the machine where the target software is installed to determine whether the activation code has expired; when the activation code has expired
  • the preset system determines whether the effective duration is 0 to determine whether the activation code has expired.
  • the preset system after activating the target software, the preset system obtains the original configuration data, and encrypts the original configuration data to obtain the encrypted original configuration data.
  • Step S33 Store the encrypted original configuration data in the target database.
  • the preset system will also save the encrypted original configuration data in the target database.
  • Step S34 Use the random number to determine the target file address for storing the encrypted original configuration data from the backup file list.
  • the encrypted original configuration data is also stored in a backup file list in pieces.
  • the N file addresses in the backup file list need to be numbered in sequence, and the numbers are in sequence from 0 to N-1.
  • the determination of a corresponding number of target file addresses from the backup file list to store the encrypted original configuration data can be specifically understood as taking the nth file address among the N file addresses The first n file addresses are determined as the target file addresses. If the number of file addresses from the nth file address to the N-1th file address is less than n, then after the N-1th file address, start from the 0th file The address starts.
  • Step S35 According to the number of the target file addresses, the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored in the target file addresses.
  • the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored in the target file Address.
  • the dividing the encrypted original configuration data into a corresponding number of segments includes: using an even distribution method to divide the encrypted original configuration data into a corresponding number of segments. If the length of the original configuration data after encryption cannot be evenly distributed into a corresponding number of segments, the length of the last segment is determined according to actual conditions. For example, if the length of the original configuration data after encryption is 120 bits, and the number of target file addresses obtained from the random number is 5, then the original configuration data after encryption is divided into 5 fragments, and the length of each fragment is 24. Bit.
  • the length of the original configuration data after encryption is 119 bits, and the number of target file addresses obtained from the random number is 5. Then the original configuration data after encryption is divided into 5 fragments. The length is 24 bits, and the length of the fifth segment is 23 bits. Correspondingly, the segments are stored in the fifth, sixth, seventh, eighth, and ninth file addresses in sequence.
  • Step S36 Obtain the changed configuration data formed by the normal operation of the target software after activation.
  • Step S37 Encrypt the changed configuration data to obtain the encrypted changed configuration data.
  • Step S38 Utilize the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein, the encrypted original configuration data is for the activation of the original configuration data using the activation code.
  • the original configuration data obtained after the target software is encrypted, and the encrypted original configuration data in the backup file list is the encrypted original configuration data stored in the backup file list in advance according to the slice storage method Data, and the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data.
  • Step S39 Compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list, if the first decrypted data is If the decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated.
  • the application schematic diagram of the software anti-cracking method disclosed in this embodiment is shown in FIG. 4.
  • the random number is obtained from the activation code, and the random number is used to obtain the remainder n to determine whether to store the encrypted
  • the number of target file addresses and target file addresses of the original configuration data, and the encrypted original configuration data is stored in the target database and the target file address in the backup file list.
  • the encrypted original configuration data in the backup file list Use the encrypted change configuration data to update the target database and all the data.
  • the get interface in the preset system to read the updated configuration data in the target database and the backup file list respectively, and decrypt them, correspondingly obtain the first decrypted data and the second decrypted data, and compare them with each other.
  • the first decrypted data and the second decrypted data if the first decrypted data and the second decrypted data are not the same, the get interface controls the target software to disable activation, and requires the target to be reactivated Software; if the first decrypted data and the second decrypted data are the same, the get interface controls the normal operation of the target software.
  • an embodiment of the present application discloses a software anti-cracking device, including:
  • the data acquisition module 11 is used to acquire the changed configuration data formed by the normal operation of the target software
  • the encryption module 12 is used to encrypt the changed configuration data to obtain the encrypted changed configuration data
  • the data update module 13 is configured to use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is the
  • the original configuration data obtained after the activation code activates the target software is the data obtained after encryption, and the encrypted original configuration data in the backup file list is stored in the backup file list in advance in a fragmented storage manner
  • the original configuration data after encryption, and the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the original configuration data after encryption;
  • the data comparison module 14 is configured to compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list ;
  • the activation control module 15 is configured to prohibit activation of the target software when the first decrypted data is different from the second decrypted data, and require the target software to be reactivated.
  • this application first obtains the change configuration data formed by the normal operation of the target software after activation; encrypts the change configuration data to obtain the encrypted change configuration data; uses the encrypted change configuration data to update the target database And the encrypted original configuration data pre-stored in the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is obtained by encrypting the original configuration data obtained after activating the target software with the activation code Data, the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in a slice storage manner in advance, and the total number of file addresses in the backup file list Is greater than the number of file fragments corresponding to the original configuration data after encryption; the first decrypted data corresponding to the updated configuration data in the target database and the first decrypted data corresponding to the updated configuration data in the backup file list The two decrypted data are compared; if the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software
  • this application first obtains the changed configuration data formed by the normal operation of the target software, and encrypts it to update the encrypted original configuration data pre-stored in the target database and the backup file list, and compare it with the original configuration data in the target database.
  • an embodiment of the present application discloses a software anti-cracking device, including a processor 21 and a memory 22;
  • the memory 22 is used to store computer programs
  • the processor 21 is configured to execute the computer program to implement the software anti-cracking method disclosed in the foregoing embodiments.
  • the embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the following steps:
  • the changed configuration data formed by the normal operation of the target software after activation; encrypt the changed configuration data to obtain the encrypted changed configuration data; use the encrypted changed configuration data to update the target database and the backup file list
  • the encrypted original configuration data saved in advance obtains the updated configuration data; wherein, the encrypted original configuration data is the data obtained by encrypting the original configuration data obtained after activating the target software with the activation code, and the backup
  • the encrypted original configuration data in the file list is the encrypted configuration data previously stored in the backup file list according to the fragmented storage mode, and the total number of file addresses in the backup file list is greater than the encrypted file list.
  • this application first obtains the change configuration data formed by the normal operation of the target software after activation; encrypts the change configuration data to obtain the encrypted change configuration data; uses the encrypted change configuration data to update the target database And the encrypted original configuration data pre-stored in the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is obtained by encrypting the original configuration data obtained after activating the target software with the activation code Data, the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in a slice storage manner in advance, and the total number of file addresses in the backup file list Is greater than the number of file fragments corresponding to the original configuration data after encryption; the first decrypted data corresponding to the updated configuration data in the target database and the first decrypted data corresponding to the updated configuration data in the backup file list The two decrypted data are compared; if the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software
  • this application first obtains the changed configuration data formed by the normal operation of the target software, and encrypts it to update the encrypted original configuration data pre-stored in the target database and the backup file list, and compare it with the target database The first decrypted data corresponding to the updated configuration data and the second decrypted data corresponding to the updated configuration data in the backup file list. If the first decrypted data and the second decrypted data are not the same, it means that all The configuration data in the target database or the backup file list is modified, which will cause the target software to be cracked. Therefore, it is forbidden to activate the target software and require the target software to be reactivated, which can prevent the software from being cracked. Avoid software being used illegally.
  • the following steps can be specifically implemented: use the set interface in the preset system to obtain information from the activated target software Changed configuration data formed by normal operation.
  • the following steps can be specifically implemented: using the encrypted changed configuration data to update the target database and the pre-stored backup file list, Including target software version data, activation code expiration time data, machine code data corresponding to the machine where the target software is installed, a random number with a preset length, the number of devices installed by the target software, activation time data, and parity
  • target software version data Including target software version data, activation code expiration time data, machine code data corresponding to the machine where the target software is installed, a random number with a preset length, the number of devices installed by the target software, activation time data, and parity
  • the change configuration data is encrypted using an asymmetric encryption algorithm to obtain the encrypted change configuration data .
  • the following steps can be specifically implemented: using an activation code to activate the target software to obtain the original configuration data of the target software; Obtain the original configuration data, and encrypt the original configuration data to obtain the encrypted original configuration data; store the encrypted original configuration data in a target database; use the random number to obtain the original configuration data from the backup
  • a target file address for storing the encrypted original configuration data is determined in the file list; according to the number of the target file addresses, the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored To the address of the target file.
  • the following steps can be specifically implemented: using the get interface in the preset system to obtain data from the target database and the The updated configuration data is read from the backup file list and decrypted to obtain the first decrypted data and the second decrypted data correspondingly; the first decrypted data and the second decrypted data are compared.
  • the steps of the method or algorithm described in combination with the embodiments disclosed in this document can be directly implemented by hardware, a software module executed by a processor, or a combination of the two.
  • the software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other known storage media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Technology Law (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Storage Device Security (AREA)

Abstract

Provided are a software anti-cracking method, device, apparatus and medium, the method comprises: acquiring change configuration data formed by the normal operation of the activated target software, and carrying out the encryption; updating encrypted original configuration data pre-stored in the target database and the standby file list by utilizing the encrypted change configuration data to obtain updated configuration data; comparing the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the standby file list; if the first decrypted data is different from the second decrypted data, forbidding to start the target software, and requiring to reactivate the target software to prevent the target software from being cracked, thereby preventing the target software from being illegally used.

Description

一种软件防破解方法、装置、设备、介质Software anti-cracking method, device, equipment and medium
本申请要求于2019年10月12日提交中国专利局、申请号为201910968794.3、发明名称为“一种软件防破解方法、装置、设备、介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on October 12, 2019, the application number is 201910968794.3, and the invention title is "a software anti-cracking method, device, equipment, and medium", the entire content of which is by reference Incorporated in this application.
技术领域Technical field
本申请涉及软件管理技术领域,特别涉及一种软件防破解方法、装置、设备、介质。This application relates to the technical field of software management, and in particular to a software anti-cracking method, device, equipment, and medium.
背景技术Background technique
随着技术的发展,在商业软件领域,越来越多的软件选择部分功能收费,这既是对研发者知识产权的保护,也是商业软件经营者对自己产品权益的正确保护手段。因此,如何保护商业软件不被破解和违法使用成为一项迫切的任务。With the development of technology, in the field of commercial software, more and more software choose to charge for some functions. This is not only the protection of intellectual property rights of developers, but also the correct means of protecting the rights and interests of their own products by commercial software operators. Therefore, how to protect commercial software from being cracked and illegally used has become an urgent task.
发明内容Summary of the invention
有鉴于此,本申请的目的在于提供一种软件防破解方法、装置、设备、介质,能够防止软件被破解,从而避免软件被违法使用。其具体方案如下:In view of this, the purpose of this application is to provide a software anti-cracking method, device, equipment, and medium, which can prevent the software from being cracked, thereby avoiding the software from being used illegally. The specific plan is as follows:
第一方面,本申请公开了一种软件防破解方法,应用于嵌入目标软件中的预设系统,包括:In the first aspect, this application discloses a software anti-cracking method applied to a preset system embedded in target software, including:
获取由激活后的所述目标软件的正常运行形成的变化配置数据;Acquiring changed configuration data formed by the normal operation of the target software after activation;
将所述变化配置数据进行加密,得到加密后变化配置数据;Encrypting the change configuration data to obtain the encrypted change configuration data;
利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后原始配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;Use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein, the encrypted original configuration data is for activating the target software with an activation code The original configuration data obtained after encryption is the data obtained after encryption, the encrypted original configuration data in the backup file list is the encrypted original configuration data stored in the backup file list according to the fragmented storage method in advance, and , The total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data;
将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;Comparing the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list;
如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。If the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated.
可选的,所述获取由目标软件的正常运行形成的变化配置数据,包括:Optionally, the obtaining the change configuration data formed by the normal operation of the target software includes:
利用所述预设系统中的set接口获取由激活后的所述目标软件的正常运行形成的变化配置数据。The set interface in the preset system is used to obtain the changed configuration data formed by the normal operation of the activated target software.
可选的,所述利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,包括:Optionally, said using the encrypted changed configuration data to update the original encrypted configuration data stored in advance in the target database and the backup file list includes:
利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的,包括目标软件版本数据、激活码失效时间数据、安装所述目标软件的机器对应的机器码数据、长度为预设长度的随机数、所述目标软件安装的设备数、激活时间数据以及奇偶校验数据的加密后原始配置数据。Use the encrypted changed configuration data to update the target database and pre-stored in the backup file list, including target software version data, activation code expiration time data, machine code data corresponding to the machine where the target software is installed, and the length is a preset length The encrypted original configuration data of the random number, the number of devices installed by the target software, the activation time data, and the parity data.
可选的,所述将所述变化配置数据进行加密,得到加密后变化配置数据,包括:Optionally, the encrypting the changed configuration data to obtain the encrypted changed configuration data includes:
利用非对称加密算法将所述变化配置数据进行加密,得到加密后变化配置数据。The asymmetric encryption algorithm is used to encrypt the changed configuration data to obtain the encrypted changed configuration data.
可选的,所述获取由目标软件的正常运行形成的变化配置数据之前,还包括:Optionally, before acquiring the changed configuration data formed by the normal operation of the target software, the method further includes:
利用激活码激活所述目标软件,以得到所述目标软件的原始配置数据;Activate the target software with an activation code to obtain the original configuration data of the target software;
对所述原始配置数据进行加密,得到所述加密后原始配置数据;Encrypting the original configuration data to obtain the original configuration data after encryption;
将所述加密后原始配置数据存储到目标数据库中;Store the encrypted original configuration data in the target database;
利用所述随机数,从所述备用文件列表中确定出用于存储所述加密后原始配置数据的目标文件地址;Using the random number to determine a target file address for storing the encrypted original configuration data from the backup file list;
根据所述目标文件地址的数量,将所述加密后原始配置数据分成相应数量的片段,并将所述片段依次存储到所述目标文件地址中。According to the number of the target file addresses, the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored in the target file addresses.
可选的,所述利用所述随机数,从所述备用分布式冗余加密文件列表中确定出用于存储所述加密后原始配置数据的目标文件地址,包括:Optionally, using the random number to determine a target file address for storing the encrypted original configuration data from the backup distributed redundant encrypted file list includes:
利用所述随机数和预设公式,确定出用于存储所述加密后原始配置数据的目标文件地址的数量;Using the random number and a preset formula to determine the number of target file addresses used to store the encrypted original configuration data;
从所述备用文件列表中确定出相应数量的目标文件地址,以存储所述加密后原始配置数据;Determine a corresponding number of target file addresses from the backup file list to store the encrypted original configuration data;
其中,所述预设公式为,n表示所述目标地址的数量,M表示所述随机数,N表示所述备用文件列表中的文件地址总数量,%表示取余运算。The preset formula is that n represents the number of the target addresses, M represents the random number, N represents the total number of file addresses in the backup file list, and% represents the remainder operation.
可选的,所述将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对,包括:Optionally, the comparing the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list includes :
利用所述预设系统中的get接口,分别从所述目标数据库和所述备用文件列表中读取所述更新后配置数据,并进行解密,对应得到第一解密数据和第二解密数据;Use the get interface in the preset system to read the updated configuration data from the target database and the backup file list respectively, and decrypt them, to obtain the first decrypted data and the second decrypted data correspondingly;
将所述第一解密数据和第二解密数据进行比对。The first decrypted data and the second decrypted data are compared.
第二方面,本申请公开了一种软件防破解装置,包括:In the second aspect, this application discloses a software anti-cracking device, including:
数据获取模块,用于获取由目标软件的正常运行形成的变化配置数据;The data acquisition module is used to acquire the changed configuration data formed by the normal operation of the target software;
加密模块,用于将所述变化配置数据进行加密,得到加密后变化配置数据;An encryption module for encrypting the changed configuration data to obtain the encrypted changed configuration data;
数据更新模块,用于利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;The data update module is configured to use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list; wherein the encrypted original configuration data is for activating the target software with an activation code The original configuration data obtained after encryption is the data obtained after encryption, the encrypted original configuration data in the backup file list is the encrypted configuration data stored in the backup file list in advance according to the fragmented storage mode, and, The total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data;
数据比对模块,用于将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;A data comparison module, configured to compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list;
启用控制模块,用于当所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。The activation control module is configured to prohibit activation of the target software when the first decrypted data is different from the second decrypted data, and require the target software to be reactivated.
第三方面,本申请公开了一种软件防破解设备,包括:In the third aspect, this application discloses a software anti-cracking device, including:
存储器和处理器;Memory and processor;
其中,所述存储器,用于存储计算机程序;Wherein, the memory is used to store a computer program;
所述处理器,用于执行所述计算机程序,以实现前述公开的软件防破解方法。The processor is used to execute the computer program to implement the software anti-cracking method disclosed above.
第四方面,本申请公开了一种计算机可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述公开的软件防破解方法。In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the software anti-cracking method disclosed above.
可见,本申请先获取由激活后的所述目标软件的正常运行形成的变化配置数据;将所述变化配置数据进行加密,得到加密后变化配置数据;利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。由此可见,本申请先获取由目标软件的正常运行形成的变化配置数据,并进行加密,以更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,并比对所述目标数据库中的更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据,如果所述第一解密数据和第二解密数据不相同,则表示所述目标数据库或所述备用文件列表中的配置数据被修改,从而会导致所述目标软件被破解,故禁止启用所述目标软件,并要求重新激活所述目标软件,能够防止软件被破解,从而避免软件被违法使用。It can be seen that this application first obtains the change configuration data formed by the normal operation of the target software after activation; encrypts the change configuration data to obtain the encrypted change configuration data; uses the encrypted change configuration data to update the target database And the encrypted original configuration data pre-stored in the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is obtained by encrypting the original configuration data obtained after activating the target software with the activation code Data, the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in a slice storage manner in advance, and the total number of file addresses in the backup file list Is greater than the number of file fragments corresponding to the original configuration data after encryption; the first decrypted data corresponding to the updated configuration data in the target database and the first decrypted data corresponding to the updated configuration data in the backup file list The two decrypted data are compared; if the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated. It can be seen that this application first obtains the changed configuration data formed by the normal operation of the target software, and encrypts it to update the encrypted original configuration data pre-stored in the target database and the backup file list, and compare it with the target database The first decrypted data corresponding to the updated configuration data and the second decrypted data corresponding to the updated configuration data in the backup file list. If the first decrypted data and the second decrypted data are not the same, it means that all The configuration data in the target database or the backup file list is modified, which will cause the target software to be cracked. Therefore, it is forbidden to activate the target software and require the target software to be reactivated, which can prevent the software from being cracked. Avoid software being used illegally.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative work.
图1为本申请公开的一种软件防破解方法流程图;Figure 1 is a flowchart of a software anti-cracking method disclosed in this application;
图2为本申请公开的一种具体的软件防破解方法流程图;Figure 2 is a flowchart of a specific software anti-cracking method disclosed in this application;
图3为本申请公开的一种具体的软件防破解方法流程图;FIG. 3 is a flowchart of a specific software anti-cracking method disclosed in this application;
图4为本申请公开的一种软件防破解方法应用示意图;Figure 4 is a schematic diagram of the application of a software anti-cracking method disclosed in this application;
图5为本申请公开的一种软件防破解装置结构示意图;FIG. 5 is a schematic structural diagram of a software anti-cracking device disclosed in this application;
图6为本申请公开的一种软件防破解设备结构图。Fig. 6 is a structural diagram of a software anti-cracking device disclosed in this application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请实施例公开了一种软件防破解方法,参见图1所示,应用于嵌入目标软件中的预设系统,该方法包括:The embodiment of the present application discloses a software anti-cracking method. As shown in FIG. 1, it is applied to a preset system embedded in target software, and the method includes:
步骤S11:获取由激活后的所述目标软件的正常运行形成的变化配置数据。Step S11: Obtain the changed configuration data formed by the normal operation of the target software after activation.
可以理解的是,所述预设系统为嵌入目标软件中的一套程序。所述目标软件在正常运行的过程中,部分配置数据会随之发生变化,所以需要获取由所述目标软件的正常运行形成的变化配置数据,所述变化配置数据可以是对可变化配置数据和恒定配置数据的总称,所述变化配置数据包括但不限于目标软件版本数据、激活码失效时间数据、安装所述目标软件的机器对应的机器码数据、长度为预设长度的随机数、所述目标软件安装的设备数、激活时间数据以及奇偶校验数据。It is understandable that the preset system is a set of programs embedded in the target software. During the normal operation of the target software, part of the configuration data will change accordingly. Therefore, it is necessary to obtain the change configuration data formed by the normal operation of the target software. The change configuration data may be a comparison between the changeable configuration data and the changeable configuration data. The general term for constant configuration data. The changed configuration data includes but is not limited to target software version data, activation code expiration time data, machine code data corresponding to the machine on which the target software is installed, random numbers with a preset length, and The number of devices installed by the target software, activation time data, and parity data.
步骤S12:将所述变化配置数据进行加密,得到加密后变化配置数据。Step S12: Encrypt the changed configuration data to obtain the encrypted changed configuration data.
本实施例中,获取到所述变化配置数据后,将所述变化配置数据进行加密,得到加密后变化配置数据。In this embodiment, after the change configuration data is obtained, the change configuration data is encrypted to obtain the encrypted change configuration data.
在第一种具体的实施方式中,所述将变化配置数据进行加密,得到加密后变化配置数据,包括:利用非对称加密算法将变化配置数据进行加密,得到加密后变化配置数据。采用非对称加密算法对所述变化配置数据进行加密时,加密和解密过程中所使用的密钥不相同,要完成正常的加密和解密过程,就必须配对使用,可以增强数据的安全性,减低配置数据被改写的概率,减小目标软件被破解的可能性。In a first specific implementation manner, the encrypting the changed configuration data to obtain the encrypted changed configuration data includes: encrypting the changed configuration data using an asymmetric encryption algorithm to obtain the encrypted changed configuration data. When an asymmetric encryption algorithm is used to encrypt the changed configuration data, the keys used in the encryption and decryption process are different. To complete the normal encryption and decryption process, they must be paired and used, which can enhance data security and reduce The probability of configuration data being rewritten reduces the possibility of target software being cracked.
在第二种具体的实施方式中,所述将变化配置数据进行加密,得到加密后变化配置数据,包括:利用对称加密算法将变化配置数据进行加密,得到加密后变化配置数据。采用所述对称加密算法对所述变化配置数据进行加密时,加密和解密所采用的密钥为相同的密钥。所述对称加密算法相比所述非对称加密算法来说,加密和解密的速度更快,但安全性相对低一些。In a second specific implementation manner, encrypting the changed configuration data to obtain the encrypted changed configuration data includes: encrypting the changed configuration data using a symmetric encryption algorithm to obtain the encrypted changed configuration data. When the symmetric encryption algorithm is used to encrypt the changed configuration data, the key used for encryption and decryption is the same key. Compared with the asymmetric encryption algorithm, the symmetric encryption algorithm has faster encryption and decryption speed, but the security is relatively lower.
步骤S13:利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量。Step S13: Use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein, the encrypted original configuration data is for the activation of the original configuration data using the activation code. The original configuration data obtained after the target software is encrypted, and the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in advance according to the slice storage method And, the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data.
可以理解的是,将所述变化配置数据进行加密后,得到所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量。所述备用文件列表中的文件地址 总数量大于所述目标数据对应的文件片段数量,使得外界不能确定所述加密后原始配置数据对应的文件片段存储在哪些文件地址下,也不确定当前文件片段表示的具体是哪些配置数据,降低了所述目标软件被破解的概率,提高所述目标软件的安全性。It is understandable that after encrypting the changed configuration data, the encrypted original configuration data stored in advance in the updated target database and the backup file list is obtained after the encrypted changed configuration data; wherein, the encrypted original configuration data is Data obtained by encrypting the original configuration data obtained after activating the target software with an activation code, and the encrypted original configuration data in the backup file list is stored in the backup file list in advance according to a fragmented storage method And the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data. The total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the target data, so that the outside world cannot determine under which file addresses the file fragments corresponding to the original configuration data after encryption are stored, or the current file fragments. Which specific configuration data is displayed reduces the probability of the target software being cracked and improves the security of the target software.
本实施例中,得到加密后变化配置数据后,利用所述加密后变化配置数据替换所述目标数据库中的所述加密后原始配置数据,得到所述目标数据库中的更新后配置数据,并根据预先存储在所述备用文件列表中的所述加密后原始配置数据的文件片段数量,将所述加密后变化配置数据分成数量相应的文件片段,按照预先保存的用于存储所述加密后原始配置数据的文件片段的目标文件地址或目标文件名称,用所述加密后变化配置数据的文件片段替换所述加密后原始配置数据的相应文件片段,得到所述备用文件列表中的更新后配置数据。所述分片式存储方式为将所述加密后原始配置数据分成一定数量的文件片段,再进行保存的存储方式。In this embodiment, after the encrypted changed configuration data is obtained, the encrypted original configuration data in the target database is replaced with the encrypted changed configuration data to obtain the updated configuration data in the target database, and according to The number of file fragments of the encrypted original configuration data pre-stored in the backup file list, the encrypted changed configuration data is divided into corresponding number of file fragments, and the encrypted original configuration data is stored in advance according to the number of file fragments. The target file address or target file name of the file segment of the data is replaced with the encrypted file segment of the changed configuration data for the corresponding file segment of the original configuration data after encryption to obtain the updated configuration data in the backup file list. The fragmented storage mode is a storage mode in which the encrypted original configuration data is divided into a certain number of file fragments and then stored.
本实施例中,所述加密后原始配置数据为加密后的原始配置数据,所述加密后原始配置数据包括但不限于所述目标软件版本数据、所述激活码失效时间数据、所述机器码数据、所述随机数、所述设备数、所述激活时间数据以及所述奇偶校验数据。其中,所述激活码失效时间数据表示激活码的失效时间,所述失效时间既可以通过失效具体年月日给定,例如2020年1月1日,也可以通过有效时长给定,例如,有效时长为2年。In this embodiment, the encrypted original configuration data is encrypted original configuration data, and the encrypted original configuration data includes but is not limited to the target software version data, the activation code expiration time data, and the machine code Data, the random number, the number of devices, the activation time data, and the parity data. Wherein, the activation code expiration time data represents the expiration time of the activation code, and the expiration time can be given by the specific year, month and day of the expiration, for example, January 1, 2020, or can be given by the validity period, for example, valid The duration is 2 years.
步骤S14:将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对。Step S14: Compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list.
可以理解的是,在所述目标软件的运行过程中,所述目标软件对应的配置数据可能被黑客修改,以非法利用所述目标软件,所以需要将所述目标数据库中的所述更新后配置数据对应的第一配置数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对,判断所述第一解密数据和所述第二解密数据是否相同,以便判断所述目标数据库或所述备用文件夹中的配置数据是否被非法修改。如果所述第一解密数据与所述 第二解密数据不相同,则所述目标数据库或所述备用文件列表中的配置数据被非法修改了。It is understandable that during the operation of the target software, the configuration data corresponding to the target software may be modified by hackers to illegally use the target software. Therefore, the updated configuration in the target database needs to be modified. The first configuration data corresponding to the data is compared with the second decrypted data corresponding to the updated configuration data in the backup file list to determine whether the first decrypted data and the second decrypted data are the same, so as to determine Whether the configuration data in the target database or the backup folder is illegally modified. If the first decrypted data is different from the second decrypted data, the configuration data in the target database or the backup file list has been illegally modified.
本实施例中,存储在所述目标数据库和所述备用文件列表中的加密后配置数据中包括奇偶校验数据,当所述备用文件列表中的任意一个存储所述加密后配置数据对应的文件片段被非法修改时,可以通过所述奇偶校验数据和剩下的文件片段,还原出那个被修改的文件片段,不会导致所述第一解密数据和所述第二解密数据不相同。但当所述加密后配置数据中的两个及以上文件片段被非法修改,或所述目标数据库被非法修改时,所述加密后配置数据不能被还原,便会导致所述第一解密数据和所述第二解密数据不相同。由于所述预设系统中的set接口对用户不开放,所以所述目标软件中没有可以被非法修改,且属于所述加密后配置数据的配置数据。In this embodiment, the encrypted configuration data stored in the target database and the backup file list includes parity data, when any one of the backup file lists stores the file corresponding to the encrypted configuration data When a fragment is illegally modified, the parity data and the remaining file fragments can be used to restore the modified file fragment without causing the first decrypted data and the second decrypted data to be different. However, when two or more file fragments in the encrypted configuration data are illegally modified, or the target database is illegally modified, the encrypted configuration data cannot be restored, which will cause the first decrypted data and The second decrypted data is different. Since the set interface in the preset system is not open to users, there is no configuration data in the target software that can be illegally modified and belongs to the encrypted configuration data.
步骤S15:如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。Step S15: If the first decrypted data is not the same as the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated.
可以理解的是,在所述第一解密数据与所述第二解密数据不相同时,则禁止启用所述目标软件,并要求重新激活所述目标软件;在所述第一解密数据与所述第二解密数据相同时,则控制所述目标软件正常运行。It is understandable that when the first decrypted data is different from the second decrypted data, the target software is forbidden to be activated, and the target software is required to be reactivated; when the first decrypted data is different from the second decrypted data, When the second decrypted data is the same, the target software is controlled to run normally.
可见,本申请先获取由激活后的所述目标软件的正常运行形成的变化配置数据;将所述变化配置数据进行加密,得到加密后变化配置数据;利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。由此可见,本申请先获取由目标软件的正常运行形成的变化配置数据,并进行加密,以更新目标数 据库和备用文件列表中预先保存的加密后原始配置数据,并比对所述目标数据库中的更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据,如果所述第一解密数据和第二解密数据不相同,则表示所述目标数据库或所述备用文件列表中的配置数据被修改,从而会导致所述目标软件被破解,故禁止启用所述目标软件,并要求重新激活所述目标软件,能够防止软件被破解,从而避免软件被违法使用。It can be seen that this application first obtains the change configuration data formed by the normal operation of the target software after activation; encrypts the change configuration data to obtain the encrypted change configuration data; uses the encrypted change configuration data to update the target database And the encrypted original configuration data pre-stored in the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is obtained by encrypting the original configuration data obtained after activating the target software with the activation code Data, the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in a slice storage manner in advance, and the total number of file addresses in the backup file list Is greater than the number of file fragments corresponding to the original configuration data after encryption; the first decrypted data corresponding to the updated configuration data in the target database and the first decrypted data corresponding to the updated configuration data in the backup file list The two decrypted data are compared; if the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated. It can be seen that this application first obtains the changed configuration data formed by the normal operation of the target software, and encrypts it to update the encrypted original configuration data pre-stored in the target database and the backup file list, and compare it with the target database The first decrypted data corresponding to the updated configuration data and the second decrypted data corresponding to the updated configuration data in the backup file list. If the first decrypted data and the second decrypted data are not the same, it means that all The configuration data in the target database or the backup file list is modified, which will cause the target software to be cracked. Therefore, it is forbidden to activate the target software and require the target software to be reactivated, which can prevent the software from being cracked. Avoid software being used illegally.
参见图2所示,本申请实施例公开了一种具体的软件防破解方法,应用于嵌入目标软件中的预设系统,该方法包括:Referring to FIG. 2, the embodiment of the present application discloses a specific software anti-cracking method, which is applied to a preset system embedded in target software, and the method includes:
步骤S21:利用所述预设系统中的set接口获取由激活后的所述目标软件的正常运行形成的变化配置数据。Step S21: Use the set interface in the preset system to obtain the changed configuration data formed by the normal operation of the activated target software.
本实施例中,所述预设系统中包括两个连接所述目标软件的接口,即set接口和get接口。利用所述set接口获取由激活后的所述目标软件的正常运行形成的变化配置数据。所述set接口以Map<String,String>的明文方式获取由所述目标软件的正常运行形成的变化配置数据,然后再通过加密算法计算出密文。In this embodiment, the preset system includes two interfaces connecting the target software, namely, a set interface and a get interface. The set interface is used to obtain the changed configuration data formed by the normal operation of the activated target software. The set interface obtains the change configuration data formed by the normal operation of the target software in the plaintext mode of Map<String, String>, and then calculates the ciphertext through an encryption algorithm.
步骤S22:将所述变化配置数据进行加密,得到加密后变化配置数据。Step S22: Encrypt the changed configuration data to obtain the encrypted changed configuration data.
步骤S23:利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后原始配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量。Step S23: Use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein, the encrypted original configuration data is for the activation of the original configuration data using the activation code. The original configuration data obtained after the target software is encrypted, and the encrypted original configuration data in the backup file list is the encrypted original configuration data stored in the backup file list in advance according to the slice storage method Data, and the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data.
步骤S24:利用所述预设系统中的get接口,分别从所述目标数据库和所述备用文件列表中读取所述加密后原始配置数据,并进行解密,对应得到第一解密数据和第二解密数据。Step S24: Use the get interface in the preset system to read the encrypted original configuration data from the target database and the backup file list respectively, and decrypt it, and obtain the first decrypted data and the second decrypted data correspondingly. Decrypt the data.
步骤S25:将所述第一解密数据和第二解密数据进行比对。Step S25: Compare the first decrypted data with the second decrypted data.
本实施例中,所述get接口对所述目标软件提供一个Map<String,String>接口。利用所述get接口分别从所述目标数据库和所述备用文件列表中读取所述更新后配置数据,并进行解密,对应的得到第一解密数据和第二解密数据。将所述第一解密数据和所述第二加密数据进行比对,判断所述第一解密数据与所述第二解密数据是否相同,以便判断所述目标数据库或所述备用文件列表中的所述加密后配置数据是否被非法修改。In this embodiment, the get interface provides a Map<String, String> interface to the target software. The get interface is used to read the updated configuration data from the target database and the backup file list respectively, and decrypt it, and correspondingly obtain the first decrypted data and the second decrypted data. The first decrypted data and the second encrypted data are compared to determine whether the first decrypted data and the second decrypted data are the same, so as to determine all the items in the target database or the backup file list. Whether the configuration data is illegally modified after encryption.
步骤S26:如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。Step S26: If the first decrypted data is not the same as the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated.
参见图3所示,本申请实施例公开了一种具体的软件防破解方法,应用于嵌入目标软件中的预设系统,该方法包括:Referring to FIG. 3, the embodiment of the present application discloses a specific software anti-cracking method, which is applied to a preset system embedded in target software, and the method includes:
步骤S31:利用激活码激活所述目标软件,以得到所述目标软件的原始配置数据。Step S31: Use the activation code to activate the target software to obtain the original configuration data of the target software.
步骤S32:对所述原始配置数据进行加密,得到加密后原始配置数据。Step S32: Encrypt the original configuration data to obtain the original configuration data after encryption.
本实施例中,需要先在目标软件被激活码激活后,获取原始配置数据,并对所述原始配置数据进行加密,得到加密后原始配置数据。其中,所述激活码由所述目标软件的运营商利用激活码生成系统产生。所述激活码生成系统用于生成激活码。具体的,所述目标软件的运营人员根据用户的采购订单,生成一个只针对此用户的序列号,再利用所述激活码生成系统,结合所述序列号和安装所述目标软件的机器的机器码生成激活码。所述激活码包括但不限于所述目标软件版本数据、所述激活码失效时间、所述机器码以及所述随机数,各个不同的数据之间采用英文逗号分隔。所述目标软件获取到所述激活码后,利用所述预设系统解密所述激活码,并根据所述激活码失效时间,判断所述激活码是否已经失效,若所述激活码已经失效,则不能激活所述目标软件,若所述激活码没有失效,则激活所述目标软件。当所述激活码失效时间以具体年月日给定时,所述预设系统通过读取安装所述目标软件的机器的主板时间,以判断所述激活码是否已经失效;当所述激活码失效时间以有效时长给定的时候,所述预设系统判断所述有 效时长是否为0,以判断所述激活码是否已经失效。In this embodiment, it is necessary to obtain the original configuration data after the target software is activated by the activation code, and encrypt the original configuration data to obtain the encrypted original configuration data. Wherein, the activation code is generated by the operator of the target software using an activation code generation system. The activation code generation system is used to generate an activation code. Specifically, the operator of the target software generates a serial number only for this user according to the user's purchase order, and then uses the activation code generation system to combine the serial number with the machine on which the target software is installed The code generates an activation code. The activation code includes, but is not limited to, the target software version data, the activation code expiration time, the machine code, and the random number. Different data are separated by English commas. After obtaining the activation code, the target software uses the preset system to decrypt the activation code, and determines whether the activation code has expired according to the activation code expiration time, and if the activation code has expired, Then the target software cannot be activated, and if the activation code is not invalid, the target software is activated. When the activation code expiration time is given by a specific year, month, and day, the preset system reads the motherboard time of the machine where the target software is installed to determine whether the activation code has expired; when the activation code has expired When the time is given by the effective duration, the preset system determines whether the effective duration is 0 to determine whether the activation code has expired.
本实施例中,在激活所述目标软件后,所述预设系统获取原始配置数据,并将所述原始配置数据进行加密,得到加密后原始配置数据。In this embodiment, after activating the target software, the preset system obtains the original configuration data, and encrypts the original configuration data to obtain the encrypted original configuration data.
步骤S33:将所述加密后原始配置数据存储到目标数据库中。Step S33: Store the encrypted original configuration data in the target database.
可以理解的是,得到所述加密后原始配置数据后,所述预设系统还会将所述加密后原始配置数据保存到目标数据库中。It is understandable that after obtaining the encrypted original configuration data, the preset system will also save the encrypted original configuration data in the target database.
步骤S34:利用所述随机数,从备用文件列表中确定出用于存储所述加密后原始配置数据的目标文件地址。Step S34: Use the random number to determine the target file address for storing the encrypted original configuration data from the backup file list.
本实施例中,在将所述加密后原始配置数据存储到所述目标数据库的过程中,还要将所述加密后原始配置数据分片存储到备用文件列表中。所述利用所述随机数,从备用文件列表中确定出用于存储所述加密后原始配置数据的目标文件地址,包括:利用所述随机数和预设公式,确定出用于存储所述加密后原始配置数据的目标文件地址的数量;从所述备用文件列表中确定出相应数量的目标文件地址,以存储所述加密后原始配置数据;其中,所述预设公式为n=M%N,n表示所述目标地址的数量,M表示所述随机数,N表示所述备用文件列表中的文件地址总数量,%表示取余运算。其中,所述备用文件列表中的N个文件地址需要依次进行编号,编号依次为0至N-1。相应的,所述从所述备用文件列表中确定出相应数量的目标文件地址,以存储所述加密后原始配置数据,具体可以理解为,将所述N个文件地址中的第n个文件地址开始的n个文件地址确定为目标文件地址,若第n个文件地址到第N-1个文件地址的文件地址数量小于n,则到第N-1个文件地址后,再从第0个文件地址开始。例如,所述随机数为100005,所述备用文件列表中的文件地址总数量20,则100005%20=5,则用于存储所述加密后原始配置数据的目标文件地址有5个,依次为第5、第6、第7、第8、第9个文件地址。所述随机数为100012,所述备用文件列表中的文件地址总数量20,则100012%20=12,则用于存储所述加密后原始配置数据的目标文件地址有12个,依次为第12、第13、第14、第15、第16、第17、第18、第19、第0、第1、第2、第3个文件地址。In this embodiment, in the process of storing the encrypted original configuration data in the target database, the encrypted original configuration data is also stored in a backup file list in pieces. The step of using the random number to determine the target file address for storing the encrypted original configuration data from the backup file list includes: using the random number and a preset formula to determine the address for storing the encrypted The number of target file addresses of the original configuration data; determine a corresponding number of target file addresses from the backup file list to store the encrypted original configuration data; wherein, the preset formula is n=M%N , N represents the number of the target addresses, M represents the random number, N represents the total number of file addresses in the backup file list, and% represents the remainder operation. Wherein, the N file addresses in the backup file list need to be numbered in sequence, and the numbers are in sequence from 0 to N-1. Correspondingly, the determination of a corresponding number of target file addresses from the backup file list to store the encrypted original configuration data can be specifically understood as taking the nth file address among the N file addresses The first n file addresses are determined as the target file addresses. If the number of file addresses from the nth file address to the N-1th file address is less than n, then after the N-1th file address, start from the 0th file The address starts. For example, if the random number is 100005, and the total number of file addresses in the backup file list is 20, then 100005% 20=5, then there are 5 target file addresses for storing the encrypted original configuration data, which are sequentially The 5th, 6th, 7th, 8th and 9th file addresses. The random number is 100012, and the total number of file addresses in the backup file list is 20, then 100012%20=12, then there are 12 target file addresses used to store the encrypted original configuration data, which are the 12th in order. , 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, and 3 file addresses.
步骤S35:根据所述目标文件地址的数量,将所述加密后原始配置数据 分成相应数量的片段,并将所述片段依次存储到所述目标文件地址中。Step S35: According to the number of the target file addresses, the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored in the target file addresses.
可以理解的是,在确定出用于保存所述加密后原始配置数据的目标文件地址后,将所述加密后原始配置数据分成相应数量的片段,并将所述片段依次存储到所述目标文件地址中。其中,所述将所述加密后原始配置数据分成相应数量的片段,包括:采用平均分配方法将所述加密后原始配置数据分成相应数量的片段。若所述加密后原始配置数据的长度不能被平均分配成相应数量的片段,则最后一个片段的长度根据实际情况决定。例如,所述加密后原始配置数据的长度为120位,由所述随机数得到的目标文件地址数量为5,则将所述加密后原始配置数据分成5个片段,每个片段的长度为24位。所述加密后原始配置数据的长度为119位,由所述随机数得到的目标文件地址数量为5,则将所述加密后原始配置数据分成5个片段,前四个片段中每个片段的长度为24位,第五个片段的长度为23位。相应的,将所述片段依次保存在第5、第6、第7、第8、第9个文件地址中。It is understandable that after the target file address for saving the encrypted original configuration data is determined, the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored in the target file Address. Wherein, the dividing the encrypted original configuration data into a corresponding number of segments includes: using an even distribution method to divide the encrypted original configuration data into a corresponding number of segments. If the length of the original configuration data after encryption cannot be evenly distributed into a corresponding number of segments, the length of the last segment is determined according to actual conditions. For example, if the length of the original configuration data after encryption is 120 bits, and the number of target file addresses obtained from the random number is 5, then the original configuration data after encryption is divided into 5 fragments, and the length of each fragment is 24. Bit. The length of the original configuration data after encryption is 119 bits, and the number of target file addresses obtained from the random number is 5. Then the original configuration data after encryption is divided into 5 fragments. The length is 24 bits, and the length of the fifth segment is 23 bits. Correspondingly, the segments are stored in the fifth, sixth, seventh, eighth, and ninth file addresses in sequence.
步骤S36:获取由激活后的所述目标软件的正常运行形成的变化配置数据。Step S36: Obtain the changed configuration data formed by the normal operation of the target software after activation.
步骤S37:将所述变化配置数据进行加密,得到加密后变化配置数据。Step S37: Encrypt the changed configuration data to obtain the encrypted changed configuration data.
步骤S38:利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后原始配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量。Step S38: Utilize the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein, the encrypted original configuration data is for the activation of the original configuration data using the activation code. The original configuration data obtained after the target software is encrypted, and the encrypted original configuration data in the backup file list is the encrypted original configuration data stored in the backup file list in advance according to the slice storage method Data, and the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data.
步骤S39:将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对,如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。Step S39: Compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list, if the first decrypted data is If the decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated.
本实施例中公开的软件防破解方法的应用示意图如图4所示,从所述激活码中获取所述随机数,并利用所述随机数得到余数n,以确定用于存储所 述加密后原始配置数据的目标文件地址数量和目标文件地址,将所述加密后原始配置数据存储到目标数据库和备用文件列表中的所述目标文件地址中。利用所述预设系统中的所述set接口获取由目标软件正常运行形成的变化配置数据,并进行加密,得到加密后变化配置数据,利用所述加密后变化配置数据更新所述目标数据库和所述备用文件列表中的所述加密后原始配置数据。利用所述预设系统中的所述get接口分别读取所述目标数据库和所述备用文件列表中的更新后配置数据,并解密,对应得到第一解密数据和第二解密数据,比对所述第一解密数据和所述第二解密数据,若所述第一解密数据和所述第二解密数据不相同,则所述get接口控制所述目标软件禁止启用,并要求重新激活所述目标软件;若所述第一解密数据和所述第二解密数据相同,则所述get接口控制所述目标软件正常运行。The application schematic diagram of the software anti-cracking method disclosed in this embodiment is shown in FIG. 4. The random number is obtained from the activation code, and the random number is used to obtain the remainder n to determine whether to store the encrypted The number of target file addresses and target file addresses of the original configuration data, and the encrypted original configuration data is stored in the target database and the target file address in the backup file list. Use the set interface in the preset system to obtain the change configuration data formed by the normal operation of the target software, and encrypt it to obtain the encrypted change configuration data. Use the encrypted change configuration data to update the target database and all the data. The encrypted original configuration data in the backup file list. Use the get interface in the preset system to read the updated configuration data in the target database and the backup file list respectively, and decrypt them, correspondingly obtain the first decrypted data and the second decrypted data, and compare them with each other. The first decrypted data and the second decrypted data, if the first decrypted data and the second decrypted data are not the same, the get interface controls the target software to disable activation, and requires the target to be reactivated Software; if the first decrypted data and the second decrypted data are the same, the get interface controls the normal operation of the target software.
参见图5所示,本申请实施例公开了一种软件防破解装置,包括:Referring to FIG. 5, an embodiment of the present application discloses a software anti-cracking device, including:
数据获取模块11,用于获取由目标软件的正常运行形成的变化配置数据;The data acquisition module 11 is used to acquire the changed configuration data formed by the normal operation of the target software;
加密模块12,用于将所述变化配置数据进行加密,得到加密后变化配置数据;The encryption module 12 is used to encrypt the changed configuration data to obtain the encrypted changed configuration data;
数据更新模块13,用于利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后原始配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;The data update module 13 is configured to use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is the The original configuration data obtained after the activation code activates the target software is the data obtained after encryption, and the encrypted original configuration data in the backup file list is stored in the backup file list in advance in a fragmented storage manner The original configuration data after encryption, and the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the original configuration data after encryption;
数据比对模块14,用于将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;The data comparison module 14 is configured to compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list ;
启用控制模块15,用于当所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。The activation control module 15 is configured to prohibit activation of the target software when the first decrypted data is different from the second decrypted data, and require the target software to be reactivated.
可见,本申请先获取由激活后的所述目标软件的正常运行形成的变化配置数据;将所述变化配置数据进行加密,得到加密后变化配置数据;利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。由此可见,本申请先获取由目标软件的正常运行形成的变化配置数据,并进行加密,以更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,并比对所述目标数据库中的更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据,如果所述第一解密数据和第二解密数据不相同,则表示所述目标数据库或所述备用文件列表中的配置数据被修改,从而会导致所述目标软件被破解,故禁止启用所述目标软件,并要求重新激活所述目标软件,能够防止软件被破解,从而避免软件被违法使用。It can be seen that this application first obtains the change configuration data formed by the normal operation of the target software after activation; encrypts the change configuration data to obtain the encrypted change configuration data; uses the encrypted change configuration data to update the target database And the encrypted original configuration data pre-stored in the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is obtained by encrypting the original configuration data obtained after activating the target software with the activation code Data, the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in a slice storage manner in advance, and the total number of file addresses in the backup file list Is greater than the number of file fragments corresponding to the original configuration data after encryption; the first decrypted data corresponding to the updated configuration data in the target database and the first decrypted data corresponding to the updated configuration data in the backup file list The two decrypted data are compared; if the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated. It can be seen that this application first obtains the changed configuration data formed by the normal operation of the target software, and encrypts it to update the encrypted original configuration data pre-stored in the target database and the backup file list, and compare it with the original configuration data in the target database. The first decrypted data corresponding to the updated configuration data and the second decrypted data corresponding to the updated configuration data in the backup file list. If the first decrypted data and the second decrypted data are not the same, it means that all The configuration data in the target database or the backup file list is modified, which will cause the target software to be cracked. Therefore, it is forbidden to activate the target software and require the target software to be reactivated, which can prevent the software from being cracked. Avoid software being used illegally.
进一步的,参见图6所示,本申请实施例公开了一种软件防破解设备,包括处理器21和存储器22;Further, referring to FIG. 6, an embodiment of the present application discloses a software anti-cracking device, including a processor 21 and a memory 22;
其中,所述存储器22,用于存储计算机程序;Wherein, the memory 22 is used to store computer programs;
所述处理器21,用于执行所述计算机程序,以实现前述实施例中公开的软件防破解方法。The processor 21 is configured to execute the computer program to implement the software anti-cracking method disclosed in the foregoing embodiments.
进一步的,本申请实施例还公开了一种计算机可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现以下步骤:Further, the embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the following steps:
获取由激活后的所述目标软件的正常运行形成的变化配置数据;将所述变化配置数据进行加密,得到加密后变化配置数据;利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。Obtain the changed configuration data formed by the normal operation of the target software after activation; encrypt the changed configuration data to obtain the encrypted changed configuration data; use the encrypted changed configuration data to update the target database and the backup file list The encrypted original configuration data saved in advance obtains the updated configuration data; wherein, the encrypted original configuration data is the data obtained by encrypting the original configuration data obtained after activating the target software with the activation code, and the backup The encrypted original configuration data in the file list is the encrypted configuration data previously stored in the backup file list according to the fragmented storage mode, and the total number of file addresses in the backup file list is greater than the encrypted file list. The number of file fragments corresponding to the original configuration data; the first decrypted data corresponding to the updated configuration data in the target database is compared with the second decrypted data corresponding to the updated configuration data in the backup file list Yes; if the first decrypted data is not the same as the second decrypted data, then it is forbidden to activate the target software and require reactivation of the target software.
可见,本申请先获取由激活后的所述目标软件的正常运行形成的变化配置数据;将所述变化配置数据进行加密,得到加密后变化配置数据;利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。由此可见,本申请先获取由目标软件的正常运行形成的变化配置数据,并进行加密,以更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,并比对所述目标数据库中的更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据,如果所述第一解密数据和第二解密数据不相同,则表示所述目标数据库或所述备用文件列表中的配置数 据被修改,从而会导致所述目标软件被破解,故禁止启用所述目标软件,并要求重新激活所述目标软件,能够防止软件被破解,从而避免软件被违法使用。It can be seen that this application first obtains the change configuration data formed by the normal operation of the target software after activation; encrypts the change configuration data to obtain the encrypted change configuration data; uses the encrypted change configuration data to update the target database And the encrypted original configuration data pre-stored in the backup file list to obtain the updated configuration data; wherein the encrypted original configuration data is obtained by encrypting the original configuration data obtained after activating the target software with the activation code Data, the encrypted original configuration data in the backup file list is the encrypted configuration data that is stored in the backup file list in a slice storage manner in advance, and the total number of file addresses in the backup file list Is greater than the number of file fragments corresponding to the original configuration data after encryption; the first decrypted data corresponding to the updated configuration data in the target database and the first decrypted data corresponding to the updated configuration data in the backup file list The two decrypted data are compared; if the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated. It can be seen that this application first obtains the changed configuration data formed by the normal operation of the target software, and encrypts it to update the encrypted original configuration data pre-stored in the target database and the backup file list, and compare it with the target database The first decrypted data corresponding to the updated configuration data and the second decrypted data corresponding to the updated configuration data in the backup file list. If the first decrypted data and the second decrypted data are not the same, it means that all The configuration data in the target database or the backup file list is modified, which will cause the target software to be cracked. Therefore, it is forbidden to activate the target software and require the target software to be reactivated, which can prevent the software from being cracked. Avoid software being used illegally.
本实施例中,所述计算机可读存储介质中保存的计算机子程序被处理器执行时,可以具体实现以下步骤:利用所述预设系统中的set接口获取由激活后的所述目标软件的正常运行形成的变化配置数据。In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: use the set interface in the preset system to obtain information from the activated target software Changed configuration data formed by normal operation.
本实施例中,所述计算机可读存储介质中保存的计算机子程序被处理器执行时,可以具体实现以下步骤:利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的,包括目标软件版本数据、激活码失效时间数据、安装所述目标软件的机器对应的机器码数据、长度为预设长度的随机数、所述目标软件安装的设备数、激活时间数据以及奇偶校验数据的加密后原始配置数据。In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: using the encrypted changed configuration data to update the target database and the pre-stored backup file list, Including target software version data, activation code expiration time data, machine code data corresponding to the machine where the target software is installed, a random number with a preset length, the number of devices installed by the target software, activation time data, and parity The original configuration data after data encryption.
本实施例中,所述计算机可读存储介质中保存的计算机子程序被处理器执行时,可以具体实现以下步骤:利用非对称加密算法将所述变化配置数据进行加密,得到加密后变化配置数据。In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: the change configuration data is encrypted using an asymmetric encryption algorithm to obtain the encrypted change configuration data .
本实施例中,所述计算机可读存储介质中保存的计算机子程序被处理器执行时,可以具体实现以下步骤:利用激活码激活所述目标软件,以得到所述目标软件的原始配置数据;获取所述原始配置数据,并对所述原始配置数据进行加密,得到所述加密后原始配置数据;将所述加密后原始配置数据存储到目标数据库中;利用所述随机数,从所述备用文件列表中确定出用于存储所述加密后原始配置数据的目标文件地址;根据所述目标文件地址的数量,将所述加密后原始配置数据分成相应数量的片段,并将所述片段依次存储到所述目标文件地址中。In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: using an activation code to activate the target software to obtain the original configuration data of the target software; Obtain the original configuration data, and encrypt the original configuration data to obtain the encrypted original configuration data; store the encrypted original configuration data in a target database; use the random number to obtain the original configuration data from the backup A target file address for storing the encrypted original configuration data is determined in the file list; according to the number of the target file addresses, the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored To the address of the target file.
本实施例中,所述计算机可读存储介质中保存的计算机子程序被处理器执行时,可以具体实现以下步骤:利用所述随机数和预设公式,确定出用于存储所述加密后原始配置数据的目标文件地址的数量;从所述备用文件列表中确定出相应数量的目标文件地址,以存储所述加密后原始配置数据;其中,所述预设公式为n=M%N,n表示所述目标地址的数量,M表示所述随机数,N表示所述备用文件列表中的文件地址总数量,%表示取 余运算。In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: using the random number and the preset formula to determine the original The number of target file addresses of configuration data; a corresponding number of target file addresses are determined from the backup file list to store the encrypted original configuration data; wherein, the preset formula is n=M%N, n Represents the number of the target addresses, M represents the random number, N represents the total number of file addresses in the backup file list, and% represents the remainder operation.
本实施例中,所述计算机可读存储介质中保存的计算机子程序被处理器执行时,可以具体实现以下步骤:利用所述预设系统中的get接口,分别从所述目标数据库和所述备用文件列表中读取所述更新后配置数据,并进行解密,对应得到第一解密数据和第二解密数据;将所述第一解密数据和第二解密数据进行比对。In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps can be specifically implemented: using the get interface in the preset system to obtain data from the target database and the The updated configuration data is read from the backup file list and decrypted to obtain the first decrypted data and the second decrypted data correspondingly; the first decrypted data and the second decrypted data are compared.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in combination with the embodiments disclosed in this document can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other known storage media.
最后,还需要说明的是,在本文中,诸如第一和第二之类的关系术语仅仅用来将一个实体或者操作与另一个实体或者操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得一系列包含其他要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations. There is any such actual relationship or sequence between operations. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a series of processes, methods, articles or equipment containing other elements not only include those elements, but also include those that are not explicitly listed. Other elements listed, or also include elements inherent to the process, method, article, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or equipment that includes the element.
以上对本申请所提供的一种软件防破解方法、装置、设备、介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同 时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The above provides a detailed introduction to the software anti-cracking method, device, device, and medium provided by this application. Specific examples are used in this article to illustrate the principles and implementation of this application. The description of the above embodiments is only for help Understand the methods and core ideas of this application; at the same time, for those of ordinary skill in the art, according to the ideas of this application, there will be changes in the specific implementation and scope of application. In summary, the content of this specification does not It should be understood as a limitation of this application.

Claims (10)

  1. 一种软件防破解方法,其特征在于,应用于嵌入目标软件中的预设系统,包括:A software anti-cracking method, characterized in that it is applied to a preset system embedded in target software, and includes:
    获取由激活后的所述目标软件的正常运行形成的变化配置数据;Acquiring changed configuration data formed by the normal operation of the target software after activation;
    将所述变化配置数据进行加密,得到加密后变化配置数据;Encrypting the change configuration data to obtain the encrypted change configuration data;
    利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述加密后原始配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后原始配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;Use the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list to obtain the updated configuration data; wherein, the encrypted original configuration data is for activating the target software with an activation code The original configuration data obtained after encryption is the data obtained after encryption, the encrypted original configuration data in the backup file list is the encrypted original configuration data stored in the backup file list according to the fragmented storage method in advance, and , The total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data;
    将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;Comparing the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list;
    如果所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。If the first decrypted data is different from the second decrypted data, the target software is prohibited from being activated, and the target software is required to be reactivated.
  2. 根据权利要求1所述的软件防破解方法,其特征在于,所述获取由目标软件的正常运行形成的变化配置数据,包括:The software anti-cracking method according to claim 1, wherein said obtaining the changed configuration data formed by the normal operation of the target software comprises:
    利用所述预设系统中的set接口获取由激活后的所述目标软件的正常运行形成的变化配置数据。The set interface in the preset system is used to obtain the changed configuration data formed by the normal operation of the activated target software.
  3. 根据权利要求2所述的软件防破解方法,其特征在于,所述利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,包括:The software anti-cracking method according to claim 2, wherein said using the encrypted changed configuration data to update the encrypted original configuration data pre-stored in the target database and the backup file list comprises:
    利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的,包括目标软件版本数据、激活码失效时间数据、安装所述目标软件的机器对应的机器码数据、长度为预设长度的随机数、所述目标软件安装的设备数、激活时间数据以及奇偶校验数据的加密后原始配置数据。Use the encrypted changed configuration data to update the target database and pre-stored in the backup file list, including target software version data, activation code expiration time data, machine code data corresponding to the machine where the target software is installed, and the length is a preset length The encrypted original configuration data of the random number, the number of devices installed by the target software, the activation time data, and the parity data.
  4. 根据权利要求2所述的软件防破解方法,其特征在于,所述将所述变化配置数据进行加密,得到加密后变化配置数据,包括:The software anti-cracking method according to claim 2, wherein the encrypting the changed configuration data to obtain the encrypted changed configuration data comprises:
    利用非对称加密算法将所述变化配置数据进行加密,得到加密后变化配置数据。The asymmetric encryption algorithm is used to encrypt the changed configuration data to obtain the encrypted changed configuration data.
  5. 根据权利要求3所述的软件防破解方法,其特征在于,所述获取由目标软件的正常运行形成的变化配置数据之前,还包括:The software anti-cracking method according to claim 3, characterized in that, before acquiring the changed configuration data formed by the normal operation of the target software, the method further comprises:
    利用激活码激活所述目标软件,以得到所述目标软件的原始配置数据;Activate the target software with an activation code to obtain the original configuration data of the target software;
    对所述原始配置数据进行加密,得到所述加密后原始配置数据;Encrypting the original configuration data to obtain the original configuration data after encryption;
    将所述加密后原始配置数据存储到目标数据库中;Store the encrypted original configuration data in the target database;
    利用所述随机数,从所述备用文件列表中确定出用于存储所述加密后原始配置数据的目标文件地址;Using the random number to determine a target file address for storing the encrypted original configuration data from the backup file list;
    根据所述目标文件地址的数量,将所述加密后原始配置数据分成相应数量的片段,并将所述片段依次存储到所述目标文件地址中。According to the number of the target file addresses, the encrypted original configuration data is divided into a corresponding number of fragments, and the fragments are sequentially stored in the target file addresses.
  6. 根据权利要求5所述的软件防破解方法,其特征在于,所述利用所述随机数,从所述备用分布式冗余加密文件列表中确定出用于存储所述加密后原始配置数据的目标文件地址,包括:The software anti-cracking method according to claim 5, wherein the random number is used to determine a target for storing the encrypted original configuration data from the list of backup distributed redundant encrypted files Document address, including:
    利用所述随机数和预设公式,确定出用于存储所述加密后原始配置数据的目标文件地址的数量;Using the random number and a preset formula to determine the number of target file addresses used to store the encrypted original configuration data;
    从所述备用文件列表中确定出相应数量的目标文件地址,以存储所述加密后原始配置数据;Determine a corresponding number of target file addresses from the backup file list to store the encrypted original configuration data;
    其中,所述预设公式为n=M%N,n表示所述目标地址的数量,M表示所述随机数,N表示所述备用文件列表中的文件地址总数量,%表示取余运算。The preset formula is n=M%N, n represents the number of target addresses, M represents the random number, N represents the total number of file addresses in the backup file list, and% represents the remainder operation.
  7. 根据权利要求2至6任一项所述的软件防破解方法,其特征在于,所述将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对,包括:The software anti-cracking method according to any one of claims 2 to 6, wherein the first decrypted data corresponding to the updated configuration data in the target database is compared with those in the backup file list. The comparison of the second decrypted data corresponding to the updated configuration data includes:
    利用所述预设系统中的get接口,分别从所述目标数据库和所述备用文件列表中读取所述更新后配置数据,并进行解密,对应得到第一解密数据和第二解密数据;Use the get interface in the preset system to read the updated configuration data from the target database and the backup file list respectively, and decrypt them, to obtain the first decrypted data and the second decrypted data correspondingly;
    将所述第一解密数据和第二解密数据进行比对。The first decrypted data and the second decrypted data are compared.
  8. 一种软件防破解装置,其特征在于,包括:A software anti-cracking device, which is characterized in that it comprises:
    数据获取模块,用于获取由目标软件的正常运行形成的变化配置数据;The data acquisition module is used to acquire the changed configuration data formed by the normal operation of the target software;
    加密模块,用于将所述变化配置数据进行加密,得到加密后变化配置数据;An encryption module for encrypting the changed configuration data to obtain the encrypted changed configuration data;
    数据更新模块,用于利用所述加密后变化配置数据更新目标数据库和备用文件列表中预先保存的加密后原始配置数据,得到更新后配置数据;其中,所述加密后原始配置数据为对利用激活码激活所述目标软件后得到的原始配置数据进行加密后得到的数据,所述备用文件列表中的所述目标配置数据为预先按照分片存储方式存储到所述备用文件列表中的加密后原始配置数据,并且,所述备用文件列表中的文件地址总数量大于所述加密后原始配置数据对应的文件片段数量;The data update module is used to update the encrypted original configuration data pre-stored in the target database and the backup file list with the encrypted changed configuration data to obtain the updated configuration data; wherein, the encrypted original configuration data is the activation The original configuration data obtained after activating the target software is the data obtained by encrypting the original configuration data. The target configuration data in the backup file list is the encrypted original data stored in the backup file list according to the fragmented storage method. Configuration data, and the total number of file addresses in the backup file list is greater than the number of file fragments corresponding to the encrypted original configuration data;
    数据比对模块,用于将所述目标数据库中的所述更新后配置数据对应的第一解密数据与所述备用文件列表中的所述更新后配置数据对应的第二解密数据进行比对;A data comparison module, configured to compare the first decrypted data corresponding to the updated configuration data in the target database with the second decrypted data corresponding to the updated configuration data in the backup file list;
    启用控制模块,用于当所述第一解密数据与所述第二解密数据不相同,则禁止启用所述目标软件,并要求重新激活所述目标软件。The activation control module is configured to prohibit activation of the target software when the first decrypted data is different from the second decrypted data, and require the target software to be reactivated.
  9. 一种软件防破解设备,包括:A software anti-cracking device, including:
    存储器和处理器;Memory and processor;
    其中,所述存储器,用于存储计算机程序;Wherein, the memory is used to store a computer program;
    所述处理器,用于执行所述计算机程序,以实现权利要求1至7任一项所述的软件防破解方法。The processor is configured to execute the computer program to implement the software anti-cracking method according to any one of claims 1 to 7.
  10. 一种计算机可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的软件防破解方法。A computer-readable storage medium for storing a computer program, wherein the computer program implements the software anti-cracking method according to any one of claims 1 to 7 when the computer program is executed by a processor.
PCT/CN2020/092844 2019-10-12 2020-05-28 Software anti-cracking method, device, apparatus and medium WO2021068519A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910968794.3A CN110795702A (en) 2019-10-12 2019-10-12 Software anti-cracking method, device, equipment and medium
CN201910968794.3 2019-10-12

Publications (1)

Publication Number Publication Date
WO2021068519A1 true WO2021068519A1 (en) 2021-04-15

Family

ID=69439076

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/092844 WO2021068519A1 (en) 2019-10-12 2020-05-28 Software anti-cracking method, device, apparatus and medium

Country Status (2)

Country Link
CN (1) CN110795702A (en)
WO (1) WO2021068519A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110795702A (en) * 2019-10-12 2020-02-14 山东英信计算机技术有限公司 Software anti-cracking method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102219A (en) * 2007-07-30 2008-01-09 华为技术有限公司 Software update system and software update method
US20100313040A1 (en) * 2009-06-09 2010-12-09 Data Domain, Inc. Segment deduplication system with encryption and compression of segments
CN106302702A (en) * 2016-08-10 2017-01-04 华为技术有限公司 Burst storage method, the Apparatus and system of data
CN108847926A (en) * 2018-06-22 2018-11-20 武汉斗鱼网络科技有限公司 A kind of client secure detection method, device and client device
CN110795702A (en) * 2019-10-12 2020-02-14 山东英信计算机技术有限公司 Software anti-cracking method, device, equipment and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067839A (en) * 2007-04-27 2007-11-07 哈尔滨工业大学 Interconnection network working software system antipirating method
CN101441692B (en) * 2008-11-21 2014-09-03 北京市研祥兴业国际智能科技有限公司 Method for binding computer hardware and software
CN103455764B (en) * 2013-08-27 2016-09-14 无锡华御信息技术有限公司 A kind of file encryption based on file division folding and decryption system
CN106874743B (en) * 2016-12-29 2020-07-10 上海雷塔智能科技有限公司 Method and system for storing and extracting smart card password
CN109886040B (en) * 2019-01-24 2021-06-22 北京融链科技有限公司 Data processing method, data processing device, storage medium and processor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102219A (en) * 2007-07-30 2008-01-09 华为技术有限公司 Software update system and software update method
US20100313040A1 (en) * 2009-06-09 2010-12-09 Data Domain, Inc. Segment deduplication system with encryption and compression of segments
CN106302702A (en) * 2016-08-10 2017-01-04 华为技术有限公司 Burst storage method, the Apparatus and system of data
CN108847926A (en) * 2018-06-22 2018-11-20 武汉斗鱼网络科技有限公司 A kind of client secure detection method, device and client device
CN110795702A (en) * 2019-10-12 2020-02-14 山东英信计算机技术有限公司 Software anti-cracking method, device, equipment and medium

Also Published As

Publication number Publication date
CN110795702A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
US11263020B2 (en) System and method for wiping encrypted data on a device having file-level content protection
US8412934B2 (en) System and method for backing up and restoring files encrypted with file-level content protection
US8589680B2 (en) System and method for synchronizing encrypted data on a device having file-level content protection
RU2295834C2 (en) Initialization, maintenance, renewal and restoration of protected mode of operation of integrated system, using device for controlling access to data
US9443111B2 (en) Device security using an encrypted keystore data structure
US8516271B2 (en) Securing non-volatile memory regions
US8281115B2 (en) Security method using self-generated encryption key, and security apparatus using the same
US8175268B2 (en) Generating and securing archive keys
US20160330024A1 (en) System and method for content protection based on a combination of a user pin and a device specific identifier
US6976167B2 (en) Cryptography-based tamper-resistant software design mechanism
US20110252232A1 (en) System and method for wiping encrypted data on a device having file-level content protection
US20080181406A1 (en) System and Method of Storage Device Data Encryption and Data Access Via a Hardware Key
US20080184035A1 (en) System and Method of Storage Device Data Encryption and Data Access
US8181028B1 (en) Method for secure system shutdown
US11019098B2 (en) Replay protection for memory based on key refresh
EP3185464B1 (en) Key generation information trees
US8891773B2 (en) System and method for key wrapping to allow secure access to media by multiple authorities with modifiable permissions
EP1636661B1 (en) Digital rights management
Yang et al. SADUS: Secure data deletion in user space for mobile devices
JP2008234544A (en) File encrypting/decrypting system, file encrypting/decrypting method and file encrypting/decrypting program
US20080175391A1 (en) Apparatus and method for cryptographic protection of directories and files
WO2021068519A1 (en) Software anti-cracking method, device, apparatus and medium
JP2002175210A (en) Method of transferring and copying, and enciphering and deciphering data
CN104866740A (en) Static analysis preventing method and device for files
CN101763319A (en) Disk FDE (Full Disk Encryption) system and method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20873906

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20873906

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20873906

Country of ref document: EP

Kind code of ref document: A1