CN113434874A - Python source code protection method and system based on pyc encryption - Google Patents

Python source code protection method and system based on pyc encryption Download PDF

Info

Publication number
CN113434874A
CN113434874A CN202110650645.XA CN202110650645A CN113434874A CN 113434874 A CN113434874 A CN 113434874A CN 202110650645 A CN202110650645 A CN 202110650645A CN 113434874 A CN113434874 A CN 113434874A
Authority
CN
China
Prior art keywords
file
python
pyc
source code
encrypted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110650645.XA
Other languages
Chinese (zh)
Other versions
CN113434874B (en
Inventor
李肯立
杨圣洪
王岩松
蔡宇辉
秦云川
吴帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan University
Zhongdian Jinxin Software Co Ltd
Original Assignee
Hunan University
Zhongdian Jinxin Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan University, Zhongdian Jinxin Software Co Ltd filed Critical Hunan University
Priority to CN202110650645.XA priority Critical patent/CN113434874B/en
Publication of CN113434874A publication Critical patent/CN113434874A/en
Application granted granted Critical
Publication of CN113434874B publication Critical patent/CN113434874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (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

The invention discloses a python source code protection method based on pyc encryption, which comprises the following steps: obtaining a user-defined Python file imported by a user in a Python source code file to be operated, performing byte code conversion processing on the user-defined Python file to generate a corresponding pyc file, and deleting the user-defined Python files; the method comprises the steps of encrypting a pyc file to obtain an encrypted pyc file, obtaining a Python interpreter source code, modifying the Python interpreter source code to obtain a modified Python interpreter source code, recompiling the modified Python interpreter source code to generate a Python interpreter binary file, executing a Python source code file to be operated by using the generated Python interpreter binary file to decrypt the obtained encrypted pyc file, and obtaining an operation result. The method can solve the technical problem that the existing Python source code confusion method and Python source code packaging method have low source code protection.

Description

Python source code protection method and system based on pyc encryption
Technical Field
The invention belongs to the technical field of network security, and particularly relates to a Python source code protection method and system based on pyc encryption.
Background
The Python programming language can be said to be the most popular computer programming language at present, and from the birth of the Python language in the early 90 s of the 20 th century to the present, more and more people begin to use the Python, and the shadow of the Python can be seen in various fields. Python belongs to the scripting (interpretive) language, namely written Python code is finally interpreted and executed by a Python interpreter, a Python code file (. py) of the Python code is basically not different from a text file, and any text editor can be opened. In some business scenarios, it is not desirable to expose the source code, so some technical means need to be used to secure the Python source code.
The currently commonly used Python source code protection schemes are probably as follows:
1. python source code obfuscation: the protection purpose is realized by renaming variable names, class names, function names and the like in the Python source code to be meaningless names or inserting meaningless junk codes into the source code, but the protection of the source code is not realized essentially, and the renaming meaningless variable names, class names, function names and the like can be renamed back to be meaningless names by some methods.
2. Using the packaging tool (py2exe, pyinstaller) packs directly into. exe's executable: the. py file is packaged into the. exe executable file for protection purposes using a third party packaging tool. However, these packaging tools are usually open source, and the packaging process can be known by analyzing the source code, and the packaging process can be unpacked according to the reverse process.
3. Convert py file to so file: the protection is achieved by converting the py file into a dynamically linked library so file, but this method is not suitable for large projects and the conversion process is cumbersome.
However, the above existing Python source code protection schemes all have some non-negligible drawbacks: firstly, for the first method, the renamed meaningless variable names, class names, function names and the like can be changed into meaningful names in a secondary renaming mode, and then the Python source codes are obtained, so that the method has low protection on the source codes; secondly, for the second method, the source code can be analyzed to understand the packing process, and the packing process is unpacked according to the reverse process to obtain the Python source code, so that the method has low protection on the source code; third, the conversion process of the third method is complicated and is not suitable for large projects.
Disclosure of Invention
Aiming at the defects or improvement requirements in the prior art, the invention provides a Python source code protection method and a pyc encryption-based Python source code protection system, aiming at solving the technical problems of low source code protection performance of the existing Python source code obfuscation method and Python source code packaging method and complicated conversion process and unsuitability for large engineering of the existing method for converting a py file into a so file by encrypting a generated pyc file and modifying Python interpreter source code to enable the encrypted pyc file to run.
To achieve the above object, according to one aspect of the present invention, there is provided a python source code protection method based on pyc encryption, comprising the steps of:
(1) obtaining a user-defined Python file imported by a user in a Python source code file to be operated, performing byte code conversion processing on the user-defined Python file to generate a corresponding pyc file, and deleting the user-defined Python files;
(2) encrypting the pyc file obtained in the step (1) to obtain an encrypted pyc file;
(3) acquiring a Python interpreter source code, and modifying the Python interpreter source code to obtain a modified Python interpreter source code;
(4) recompiling the modified Python interpreter source code obtained in the step (3) to generate a Python interpreter binary file;
(5) and (4) executing the Python source code file to be operated by using the Python interpreter binary file generated in the step (4) so as to decrypt the pyc file encrypted in the step (2) and obtain an operation result.
Preferably, in step (1), the component function in the py _ component module is used to perform byte code conversion processing on the custom Python file imported by the user to generate a corresponding pyc file.
Preferably, step (2) comprises the sub-steps of:
(2-1) acquiring the pyc file obtained in the step (1), and encrypting the pyc file to obtain a pyc ciphertext;
(2-2) setting a self-defined encrypted file mark for the pyc ciphertext obtained in the step (2-1) to obtain a new pyc ciphertext;
and (2-3) outputting the new pyc ciphertext obtained in the step (2-2) to a specified path to obtain a final encrypted pyc file.
Preferably, it is characterized in that the first and second parts,
the encryption algorithm used in the step (2-1) is a symmetric encryption algorithm, preferably an Advanced Encryption Standard (AES) encryption algorithm;
step (2-2) is to modify the last two bytes of the magic number in the pyc ciphertext obtained in step (2-1) into 'little' to realize the setting of a custom encrypted file mark for the pyc ciphertext;
the pyc ciphertext includes the magic number of Python, time information for pyc file creation, and a PyCodeObject object.
Preferably, step (3) comprises the sub-steps of:
and (3-1) obtaining a Python interpreter source code, and positioning the Python interpreter source code to obtain a function for reading the content in the self-defined Python file imported by the user, wherein the function comprises a _ classfy _ pyc function and a PyMarshal _ ReadLastObjectFromFile function.
And (3-2) modifying the function obtained in the step (3-1) to obtain a new Python interpreter source code.
Preferably, step (3-2) comprises the sub-steps of:
(3-2-1) modifying the class _ pyc function obtained in the step (3-1) to identify the self-defined encrypted file mark set in the step (2-2), judging whether the corresponding pyc file is encrypted according to the identification result, if so, entering the step (3-2-2), otherwise, entering the step (3-2-3);
(3-2-2) adding a PyMarshal _ ReadEncrypted ObjectFromFile function in a Python interpreter source code, and decrypting the encrypted pyc file by using the function to obtain a decrypted file plaintext;
(3-2-3) reading the unencrypted pyc file by using the PyMarshal _ ReadLastObjectFromFile function obtained in the step (3-1) to obtain the file content;
preferably, step (5) comprises the sub-steps of:
(5-1) identifying the self-defined encrypted file mark set in the step (2-2) by using the modified _ class _ pyc function in the step (3-2-1), judging whether the pyc file is encrypted according to an identification result, if so, entering the step (5-2), otherwise, entering the step (5-3);
(5-2) decrypting the encrypted pyc file by using the function PyMarshal _ ReadEncrypted ObjectFromFile newly added in the step (3-2-2) to obtain a plaintext of the decrypted file as the file content, and entering the step (5-4);
(5-3) reading the unencrypted pyc file by using the PyMarshal _ ReadLastObjectFromFile function obtained in the step (3-1) to obtain the file content, and entering the step (5-4);
and (5-4) operating the obtained file content to obtain an operating result.
According to another aspect of the invention, there is provided a python source code protection system based on pyc encryption, comprising:
the system comprises a first module, a second module and a third module, wherein the first module is used for acquiring a user-defined Python file imported by a user in a Python source code file to be operated, performing byte code conversion processing on the user-defined Python file to generate a corresponding pyc file, and deleting the user-defined Python files;
the second module is used for encrypting the pyc file obtained by the first module to obtain an encrypted pyc file;
the third module is used for acquiring a Python interpreter source code and modifying the Python interpreter source code to obtain a modified Python interpreter source code;
the fourth module is used for recompiling the modified Python interpreter source code obtained by the third module to generate a Python interpreter binary file;
and the fifth module is used for executing the Python source code file to be operated by using the binary file of the Python interpreter generated by the fourth module so as to decrypt the pyc file encrypted by the second module and obtain an operation result.
In general, compared with the prior art, the above technical solution contemplated by the present invention can achieve the following beneficial effects:
(1) the method adopts the step (1) and the step (2), encrypts the pyc file through a symmetric encryption algorithm, and deletes the corresponding source code file at the same time, so that the technical problem of low source code protection in the conventional Python source code confusion method can be solved;
(2) the invention adopts the step (1) and the step (2), encrypts the pyc file by the symmetric encryption algorithm and deletes the corresponding source code file at the same time, thereby solving the technical problem of lower source code protection in the existing Python source code packaging method;
(3) because the steps (3) and (4) are adopted, the decryption code of the encrypted pyc file is added by modifying the source code of the Python interpreter, the pyc file can be automatically identified and decrypted without human intervention, and the technical problems of complicated process and unsuitability for large engineering existing in the conventional method for converting the py file into the so file can be solved;
(4) because the steps (1) and (2) are adopted, the pyc file is encrypted through a symmetric encryption algorithm, and the corresponding source code file is deleted, the security of the source code file is enhanced, and the decompilation difficulty of the pyc file is improved;
(5) because the step (5) is adopted, the decrypted and operated file is the pyc file, the Python interpreter can not regenerate the pyc file, and the operation efficiency of the program is improved.
Drawings
FIG. 1 is a flow chart of the python source code protection method based on pyc encryption of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The basic idea of the invention is that firstly, a symmetric encryption algorithm is utilized to encrypt a user-defined Python file imported by a user in a Python source code file to be operated to obtain a corresponding encrypted pyc file; the Python interpreter source code is then modified so that it can run the encrypted pyc file and get the correct running result. The method creatively selects the encrypted pyc file, and enables the Python interpreter to operate the encrypted pyc file, so that the safety of the Python source code is improved to the safety of the binary file; the method and the device provided by the invention can be used for deleting the original pyc file while encrypting the pyc file, so that the safety of the source code file is ensured, the decompilation difficulty of the pyc file is improved, and the problem of lower safety of the pyc file in the prior art is solved.
Referring to FIG. 1, the present invention provides a python source code protection method based on pyc encryption, which includes the following steps:
(1) obtaining a user-defined Python file imported by a user in a Python source code file to be operated, performing byte code conversion processing on the user-defined Python file to generate a corresponding pyc file, and deleting the user-defined Python files;
specifically, in the step, a complex function in a py _ complex module is used for performing byte code conversion processing on a user-defined Python file imported by a user to generate a corresponding pyc file;
the step (1) has the advantage that the original self-defined Python file is deleted, so that the safety of the source code file is ensured.
(2) Encrypting the pyc file obtained in the step (1) to obtain an encrypted pyc file;
the step (2) has the advantage that the pyc file obtained in the step (1) is encrypted, so that the decompilation difficulty of the pyc file is improved.
Specifically, step (2) includes the following substeps:
(2-1) acquiring the pyc file obtained in the step (1), and encrypting the pyc file to obtain a pyc ciphertext;
specifically, the Encryption algorithm used in this step is a symmetric Encryption algorithm, preferably an Advanced Encryption Standard (AES) Encryption algorithm;
(2-2) setting a self-defined encrypted file mark for the pyc ciphertext obtained in the step (2-1) to obtain a new pyc ciphertext;
specifically, in the step, the last two bytes of the Magic number (Magic number) in the pyc ciphertext obtained in the step (2-1) are modified into 'little', so that a user-defined encrypted file mark is set for the pyc ciphertext;
further, the pyc ciphertext contains three pieces of information: magic numbers for Python, time information for pyc file creation, and PyCodeObject object.
(2-3) outputting the new pyc ciphertext obtained in the step (2-2) to a specified path to obtain a final encrypted pyc file;
for example, the new pyc ciphertext from step (2-2) may be exported to a path such as "C: \ Users \ Desktop \ import.
(3) Acquiring a Python interpreter source code, and modifying the Python interpreter source code to obtain a modified Python interpreter source code;
specifically, step (3) includes the following substeps:
and (3-1) obtaining a Python interpreter source code, and positioning the Python interpreter source code to obtain a function for reading the content in the self-defined Python file imported by the user, wherein the function comprises a _ classfy _ pyc function and a PyMarshal _ ReadLastObjectFromFile function.
(3-2) modifying the function obtained in the step (3-1) to obtain a new Python interpreter source code;
specifically, step (3-2) includes the following substeps:
(3-2-1) modifying the class _ pyc function obtained in the step (3-1) to identify the self-defined encrypted file mark set in the step (2-2), judging whether the corresponding pyc file is encrypted according to the identification result, if so, entering the step (3-2-2), otherwise, entering the step (3-2-3);
the reason why the _ class _ pyc function is modified in step (3-2-1) is that the data of the pyc file first passes through the _ class _ pyc function, and the _ class _ pyc function parses the file header to extract some information of the whole, so that the _ class _ pyc function needs to be modified to identify the custom encrypted file flag set in step (2-2).
(3-2-2) adding a PyMarshal _ ReadEncrypted ObjectFromFile function in a Python interpreter source code, and decrypting the encrypted pyc file by using the function to obtain a decrypted file plaintext;
specifically, the decryption algorithm in the function PyMarshal _ readencrypted objectfromfile used in step (3-2-2) completely corresponds to the encryption algorithm used in step (2).
The self-defined function pymarshaljreadencryptedobjectfromfile in this step (3-2-2) is an improvement of the original pymarshaljreadlastobjectfromfile function in the source code of the Python interpreter, and an AES decryption function is added on the basis of the improvement.
(3-2-3) reading the unencrypted pyc file by using the PyMarshal _ ReadLastObjectFromFile function obtained in the step (3-1) to obtain the file content;
(4) recompiling the modified Python interpreter source code obtained in the step (3) to generate a Python interpreter binary file;
the advantage of this step (4) is that the Python interpreter source code obtained in step (3) is recompiled, and the generated binary file of the Python interpreter is portable and fast, and is suitable for projects of any scale.
(5) And (4) executing the Python source code file to be operated by using the Python interpreter binary file generated in the step (4) so as to decrypt the pyc file encrypted in the step (2) and obtain an operation result.
Specifically, step (5) includes the following substeps:
(5-1) identifying the self-defined encrypted file mark set in the step (2-2) by using the modified _ class _ pyc function in the step (3-2-1), judging whether the pyc file is encrypted according to an identification result, if so, entering the step (5-2), otherwise, entering the step (5-3);
(5-2) decrypting the encrypted pyc file by using the function PyMarshal _ ReadEncrypted ObjectFromFile newly added in the step (3-2-2) to obtain a plaintext of the decrypted file as the file content, and entering the step (5-4);
(5-3) reading the unencrypted pyc file by using the PyMarshal _ ReadLastObjectFromFile function obtained in the step (3-1) to obtain the file content, and entering the step (5-4);
and (5-4) operating the obtained file content to obtain an operating result.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. A python source code protection method based on pyc encryption is characterized by comprising the following steps:
(1) and acquiring a user-defined Python file imported by a user in a Python source code file to be operated, performing byte code conversion processing on the user-defined Python file to generate a corresponding pyc file, and deleting the user-defined Python files.
(2) Encrypting the pyc file obtained in the step (1) to obtain an encrypted pyc file;
(3) and acquiring a Python interpreter source code, and modifying the Python interpreter source code to obtain a modified Python interpreter source code.
(4) Recompiling the modified Python interpreter source code obtained in the step (3) to generate a Python interpreter binary file;
(5) and (4) executing the Python source code file to be operated by using the Python interpreter binary file generated in the step (4) so as to decrypt the pyc file encrypted in the step (2) and obtain an operation result.
2. The Python source code protection method based on pyc encryption as claimed in claim 1, wherein step (1) is to use a complex function in the py _ complex module to perform byte code conversion processing on the custom Python file imported by the user to generate a corresponding pyc file.
3. A pyc-encryption-based python source code protection method according to claim 1 or 2, wherein step (2) comprises the sub-steps of:
(2-1) acquiring the pyc file obtained in the step (1), and encrypting the pyc file to obtain a pyc ciphertext;
(2-2) setting a self-defined encrypted file mark for the pyc ciphertext obtained in the step (2-1) to obtain a new pyc ciphertext;
and (2-3) outputting the new pyc ciphertext obtained in the step (2-2) to a specified path to obtain a final encrypted pyc file.
4. A python source code protection method based on pyc encryption according to any one of claims 1 to 3,
the encryption algorithm used in the step (2-1) is a symmetric encryption algorithm, preferably an Advanced Encryption Standard (AES) encryption algorithm;
step (2-2) is to modify the last two bytes of the magic number in the pyc ciphertext obtained in step (2-1) into 'little' to realize the setting of a custom encrypted file mark for the pyc ciphertext;
the pyc ciphertext includes the magic number of Python, time information for pyc file creation, and a PyCodeObject object.
5. A pyc-encryption-based python source code protection method according to claim 1, wherein step (3) comprises the sub-steps of:
and (3-1) obtaining a Python interpreter source code, and positioning the Python interpreter source code to obtain a function for reading the content in the self-defined Python file imported by the user, wherein the function comprises a _ classfy _ pyc function and a PyMarshal _ ReadLastObjectFromFile function.
And (3-2) modifying the function obtained in the step (3-1) to obtain a new Python interpreter source code.
6. A pyc-encryption-based python source code protection method according to claim 5, wherein step (3-2) comprises the sub-steps of:
(3-2-1) modifying the class _ pyc function obtained in the step (3-1) to identify the self-defined encrypted file mark set in the step (2-2), judging whether the corresponding pyc file is encrypted according to the identification result, if so, entering the step (3-2-2), otherwise, entering the step (3-2-3);
(3-2-2) adding a PyMarshal _ ReadEncrypted ObjectFromFile function in a Python interpreter source code, and decrypting the encrypted pyc file by using the function to obtain a decrypted file plaintext;
and (3-2-3) reading the unencrypted pyc file by using the PyMarshal _ ReadLastObjectFromFile function obtained in the step (3-1) to obtain the file content.
7. A pyc-encryption-based python source code protection method according to claim 1, wherein step (5) comprises the sub-steps of:
(5-1) identifying the self-defined encrypted file mark set in the step (2-2) by using the modified _ class _ pyc function in the step (3-2-1), judging whether the pyc file is encrypted according to an identification result, if so, entering the step (5-2), otherwise, entering the step (5-3);
(5-2) decrypting the encrypted pyc file by using the function PyMarshal _ ReadEncrypted ObjectFromFile newly added in the step (3-2-2) to obtain a plaintext of the decrypted file as the file content, and entering the step (5-4);
(5-3) reading the unencrypted pyc file by using the PyMarshal _ ReadLastObjectFromFile function obtained in the step (3-1) to obtain the file content, and entering the step (5-4);
and (5-4) operating the obtained file content to obtain an operating result.
8. A python source code protection system based on pyc encryption, comprising:
the system comprises a first module, a second module and a third module, wherein the first module is used for acquiring a user-defined Python file imported by a user in a Python source code file to be operated, performing byte code conversion processing on the user-defined Python file to generate a corresponding pyc file, and deleting the user-defined Python files;
the second module is used for encrypting the pyc file obtained by the first module to obtain an encrypted pyc file;
the third module is used for acquiring a Python interpreter source code and modifying the Python interpreter source code to obtain a modified Python interpreter source code;
the fourth module is used for recompiling the modified Python interpreter source code obtained by the third module to generate a Python interpreter binary file;
and the fifth module is used for executing the Python source code file to be operated by using the binary file of the Python interpreter generated by the fourth module so as to decrypt the pyc file encrypted by the second module and obtain an operation result.
CN202110650645.XA 2021-06-11 2021-06-11 Python source code protection method and system based on pyc encryption Active CN113434874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110650645.XA CN113434874B (en) 2021-06-11 2021-06-11 Python source code protection method and system based on pyc encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110650645.XA CN113434874B (en) 2021-06-11 2021-06-11 Python source code protection method and system based on pyc encryption

Publications (2)

Publication Number Publication Date
CN113434874A true CN113434874A (en) 2021-09-24
CN113434874B CN113434874B (en) 2022-05-20

Family

ID=77755624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110650645.XA Active CN113434874B (en) 2021-06-11 2021-06-11 Python source code protection method and system based on pyc encryption

Country Status (1)

Country Link
CN (1) CN113434874B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116089983A (en) * 2023-02-23 2023-05-09 北京微步在线科技有限公司 Reinforcing compiling method and device for py file

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030229885A1 (en) * 2002-06-06 2003-12-11 International Business Machines Corporation System and method for automated source code generation
CN1808378A (en) * 2005-01-18 2006-07-26 西门子公司 Program system, configuration method system device thereof
GB0907171D0 (en) * 2009-04-27 2009-06-10 Springsource Ltd Method and apparatus for automatically generating source code files in a storage unit
CN106503496A (en) * 2016-12-08 2017-03-15 合肥康捷信息科技有限公司 Replaced and the Python shell script anti-reversal methods for merging based on operation code
CN106599628A (en) * 2016-12-08 2017-04-26 合肥康捷信息科技有限公司 Python byte code file protection method based on module hook
CN107315930A (en) * 2017-07-07 2017-11-03 成都恒高科技有限公司 A kind of method of protection Python programs
CN107808101A (en) * 2017-11-06 2018-03-16 上海金途信息科技有限公司 A kind of Intellectual Property Right Protection System by encrypting Python plaintext source codes token
CN108363911A (en) * 2018-02-11 2018-08-03 西安四叶草信息技术有限公司 A kind of Python scripts obscure, the method and device of watermark
CN110378085A (en) * 2019-07-30 2019-10-25 四川长虹电器股份有限公司 A kind of Python bytecode anti-reversing method
CN110929234A (en) * 2019-11-28 2020-03-27 施羊梦燊 Python program encryption protection system and method based on code virtualization
CN111523120A (en) * 2020-04-30 2020-08-11 广州锦行网络科技有限公司 Python source code security protection implementation method and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030229885A1 (en) * 2002-06-06 2003-12-11 International Business Machines Corporation System and method for automated source code generation
CN1808378A (en) * 2005-01-18 2006-07-26 西门子公司 Program system, configuration method system device thereof
GB0907171D0 (en) * 2009-04-27 2009-06-10 Springsource Ltd Method and apparatus for automatically generating source code files in a storage unit
CN106503496A (en) * 2016-12-08 2017-03-15 合肥康捷信息科技有限公司 Replaced and the Python shell script anti-reversal methods for merging based on operation code
CN106599628A (en) * 2016-12-08 2017-04-26 合肥康捷信息科技有限公司 Python byte code file protection method based on module hook
CN107315930A (en) * 2017-07-07 2017-11-03 成都恒高科技有限公司 A kind of method of protection Python programs
CN107808101A (en) * 2017-11-06 2018-03-16 上海金途信息科技有限公司 A kind of Intellectual Property Right Protection System by encrypting Python plaintext source codes token
CN108363911A (en) * 2018-02-11 2018-08-03 西安四叶草信息技术有限公司 A kind of Python scripts obscure, the method and device of watermark
CN110378085A (en) * 2019-07-30 2019-10-25 四川长虹电器股份有限公司 A kind of Python bytecode anti-reversing method
CN110929234A (en) * 2019-11-28 2020-03-27 施羊梦燊 Python program encryption protection system and method based on code virtualization
CN111523120A (en) * 2020-04-30 2020-08-11 广州锦行网络科技有限公司 Python source code security protection implementation method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
聂庆鹏: "一种PHP程序源代码加密保护机制的设计", 《信息系统工程》 *
陈悟等: "一种有效的Python字节码保护方法", 《电子技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116089983A (en) * 2023-02-23 2023-05-09 北京微步在线科技有限公司 Reinforcing compiling method and device for py file
CN116089983B (en) * 2023-02-23 2024-03-26 北京微步在线科技有限公司 Reinforcing compiling method and device for py file

Also Published As

Publication number Publication date
CN113434874B (en) 2022-05-20

Similar Documents

Publication Publication Date Title
CN106599628B (en) A kind of Python byte code files guard method based on module hook
CN103218549B (en) A kind of method of Java source code encryption and decryption and device
CN110598379B (en) Method, equipment and storage medium for realizing character string confusion
JP4840782B2 (en) Program conversion device, secure processing device, computer program, and recording medium
KR101861341B1 (en) Deobfuscation apparatus of application code and method of deobfuscating application code using the same
CN105162588B (en) A kind of media file encipher-decipher method and device
CN111159662A (en) Data processing method and device
CN104462990A (en) Character string decrypting and encrypting method and device
CN111010266B (en) Message encryption and decryption, reading and writing method and device, computer equipment and storage medium
CN113434874B (en) Python source code protection method and system based on pyc encryption
CN110704854A (en) Stream type encryption method aiming at text data reserved format
CN110262908A (en) A kind of processing method and processing device of shear plate data
Park et al. Research on Note-Taking Apps with Security Features.
US20170366514A1 (en) Code obfuscation and associated objects
CN111523120A (en) Python source code security protection implementation method and system
CN105554038A (en) Control method for data security during on-line system and off-line system data interaction
CN103605927B (en) Encryption and decryption method and device based on embedded Linux system
CN107169370A (en) The encryption method and encryption device of executable file
CN116226881A (en) Source code encryption method based on compiling language
CN109995526A (en) A kind of storage method of key and the call method and device of device, key
KR20140025146A (en) Method, apparatus and computer-readable storage for encrypting data file
CN106156625A (en) The method of a kind of plug-in unit signature and electronic equipment
CN112311529A (en) Data encryption method, data decryption method and data processing method of database
CN113360859B (en) Python interpreter-based encrypted file security control method and device
CN115242540B (en) Data processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant