Python code reinforcement method and system based on byte code replacement, storage medium and computer equipment
The invention provides a Python code reinforcement method based on byte code replacement, which comprises the following steps of: performing replacement processing on byte codes in a first Python script according to a predefined rule to generate a second Python script; detecting and identifying the...
Saved in:
Main Authors | , , |
---|---|
Format | Patent |
Language | Chinese English |
Published |
27.06.2023
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The invention provides a Python code reinforcement method based on byte code replacement, which comprises the following steps of: performing replacement processing on byte codes in a first Python script according to a predefined rule to generate a second Python script; detecting and identifying the reinforced second Python script; rewriting an analysis program of the Python source code according to a reverse analysis rule associated with the predefined rule mapping; and executing the second Python script through the analysis program. The invention further provides a Python code reinforcement system based on byte code replacement, a storage medium and computer equipment. Therefore, the method can effectively prevent the python code from being maliciously leaked and plagiarized.
本发明提供了一种基于字节码替换的Python代码加固方法,根据预定义规则,对第一Python脚本中的字节码进行替换处理,以生成第二Python脚本;检测识别加固后的所述第二Python脚本;依据与所述预定义规则映射关联的逆向解析规则,改写Python源码的解析程序;通过所述解析程序执行所述第二Python脚本。本发明还提供了一种基于字节码替换的Python代码加固系统、存储介质及计算机设备。借此,本发明能够有效防止python代码被恶意泄露剽窃。 |
---|---|
Bibliography: | Application Number: CN202111536748 |