CN113434874B - 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 PDFInfo
- Publication number
- CN113434874B CN113434874B CN202110650645.XA CN202110650645A CN113434874B CN 113434874 B CN113434874 B CN 113434874B CN 202110650645 A CN202110650645 A CN 202110650645A CN 113434874 B CN113434874 B CN 113434874B
- Authority
- CN
- China
- Prior art keywords
- file
- pyc
- python
- source code
- function
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 238000006243 chemical reaction Methods 0.000 claims abstract description 12
- 238000012545 processing Methods 0.000 claims abstract description 9
- 108010001267 Protein Subunits Proteins 0.000 claims 1
- 238000004806 packaging method and process Methods 0.000 abstract description 6
- 230000006870 function Effects 0.000 description 37
- 230000008569 process Effects 0.000 description 8
- 230000008901 benefit Effects 0.000 description 4
- 230000006872 improvement Effects 0.000 description 4
- 238000012858 packaging process Methods 0.000 description 2
- 238000012856 packing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/121—Restricting unauthorised execution of programs
- G06F21/125—Restricting 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
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.
Currently, the 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. Converting the py file into the 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 respective 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 (2), 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 (5) 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 (4)
1. A python source code protection method based on pyc encryption is characterized by comprising 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;
(2) encrypting the pyc file obtained in the step (1) to obtain an encrypted pyc file; the step (2) comprises the following substeps:
(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;
(2-3) outputting the new pyc ciphertext obtained in the step (2-2) to a specified path to obtain a final 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; the step (3) comprises the following substeps:
(3-1) obtaining a Python interpreter source code, and positioning the Python interpreter source code to obtain a function for reading the content in a self-defined Python file imported by a 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; the 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);
(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;
(4) recompiling the modified Python interpreter source code obtained in the step (3) to generate a Python interpreter binary file;
(5) executing the Python source code file to be operated by using the binary file of the Python interpreter generated in the step (4) so as to decrypt the encrypted pyc file in the step (2) and obtain an operation result; the step (5) comprises 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 newly added function PyMarshal _ ReadEncrypted ObjectFromFile in the step (3-2-2) to obtain a decrypted file plaintext as 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.
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. The pyc-encryption-based python source code protection method of claim 2,
the encryption algorithm used in the step (2-1) is a symmetric 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 of pyc file creation, and PyCodeObject object.
4. 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 second module includes the following sub-modules:
the first submodule is used for acquiring the pyc file obtained by the first submodule and encrypting the pyc file to obtain a pyc ciphertext;
the second submodule is used for setting a self-defined encrypted file mark for the pyc ciphertext obtained by the first submodule so as to obtain a new pyc ciphertext;
the third submodule is used for outputting the new pyc ciphertext obtained by the second submodule to a specified path so as to obtain a final 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 third module comprises the following substeps:
the fourth submodule is used for acquiring a Python interpreter source code and positioning the Python interpreter source code to obtain a function for reading the content in a self-defined Python file imported by a user, wherein the function comprises a _ classify _ pyc function and a PyMarshal _ ReadLastObjectFromFile function;
the fifth sub-module is used for modifying the function obtained by the fourth sub-module to obtain a new Python interpreter source code; the fifth submodule includes the following subunits:
the first subunit is used for modifying the class-pyc function obtained by the fourth submodule to identify a self-defined encrypted file mark set in the second submodule and judging whether the corresponding pyc file is encrypted or not according to an identification result, if so, the second subunit is entered, and if not, the third subunit is entered;
the second subunit is used for newly 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;
a third sub-unit, configured to read an unencrypted pyc file using a PyMarshal _ ReadLastObjectFromFile function obtained by the fourth sub-module to obtain file content;
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;
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; the fifth module includes the following sub-modules:
the sixth submodule is used for identifying a self-defined encrypted file mark set in the second submodule by using the modified _ classify _ pyc function of the first submodule, judging whether the pyc file is encrypted or not according to an identification result, if so, entering the seventh submodule, and otherwise, entering the eighth submodule;
the seventh submodule is used for decrypting the encrypted pyc file by using a function PyMarshal _ ReadEncrypted ObjectFromFile newly added in the second subunit to obtain a decrypted file plaintext as file content, and the decrypted file plaintext enters the ninth submodule;
the eighth submodule is used for reading the unencrypted pyc file by using the PyMarshal _ ReadLastObjectFromFile function obtained by the fourth submodule to obtain the file content and entering the ninth submodule;
and the ninth sub-module is used for operating the obtained file content to obtain an operation result.
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 CN113434874A (en) | 2021-09-24 |
CN113434874B true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116089983B (en) * | 2023-02-23 | 2024-03-26 | 北京微步在线科技有限公司 | Reinforcing compiling method and device for py file |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7392504B2 (en) * | 2002-06-06 | 2008-06-24 | International Business Machines Corporation | System and method for automated source code generation |
DE102005002362A1 (en) * | 2005-01-18 | 2006-07-27 | Siemens Ag | Program system configuration method for medical image display, involves setting up logical communications between interfaces of program components and interfaces of source code event handler to process generated events by handler |
GB0907171D0 (en) * | 2009-04-27 | 2009-06-10 | Springsource Ltd | Method and apparatus for automatically generating source code files in a storage unit |
CN106503496B (en) * | 2016-12-08 | 2019-03-19 | 合肥康捷信息科技有限公司 | Based on operation code replacement and combined Python shell script anti-reversal method |
CN106599628B (en) * | 2016-12-08 | 2019-04-02 | 合肥康捷信息科技有限公司 | A kind of Python byte code files guard method based on module hook |
CN107315930A (en) * | 2017-07-07 | 2017-11-03 | 成都恒高科技有限公司 | A kind of method of protection Python programs |
CN107808101B (en) * | 2017-11-06 | 2020-11-06 | 上海金途信息科技有限公司 | Intellectual property protection system by encrypting Python plaintext source code token |
CN108363911B (en) * | 2018-02-11 | 2021-10-29 | 西安四叶草信息技术有限公司 | Python script obfuscating and watermarking method and device |
CN110378085A (en) * | 2019-07-30 | 2019-10-25 | 四川长虹电器股份有限公司 | A kind of Python bytecode anti-reversing method |
CN110929234B (en) * | 2019-11-28 | 2023-03-24 | 施羊梦燊 | 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 |
-
2021
- 2021-06-11 CN CN202110650645.XA patent/CN113434874B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN113434874A (en) | 2021-09-24 |
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 | |
KR101861341B1 (en) | Deobfuscation apparatus of application code and method of deobfuscating application code using the same | |
WO2013108698A1 (en) | System for determining whether character string has been accepted by automaton | |
CN105162588B (en) | A kind of media file encipher-decipher method and device | |
CN104462990A (en) | Character string decrypting and encrypting method and device | |
CN110704854B (en) | Stream type encryption method aiming at text data reserved format | |
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 | |
CN106357402A (en) | Data encryption-decryption processing method and device | |
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 | |
CN110830261B (en) | Encryption method, encryption device, computer equipment and storage medium | |
CN111523120A (en) | Python source code security protection implementation method and system | |
CN103605927B (en) | Encryption and decryption method and device based on embedded Linux system | |
CN110880965A (en) | Outgoing electronic document encryption method, system, terminal and storage medium | |
CN109995526A (en) | A kind of storage method of key and the call method and device of device, key | |
US20230169186A1 (en) | Method to secure computer code | |
CN111639358B (en) | Method and device for encrypting instruction and decrypting encrypted instruction | |
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 | |
CN113360859B (en) | Python interpreter-based encrypted file security control method and device | |
CN115242540B (en) | Data processing method and system | |
CN114491580B (en) | Database sensitive information encryption method and device |
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 |