Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Python byte code file protection method based on module hook

A technology of bytecode files and source code files, applied in the field of software protection, can solve problems such as infringement of Python software intellectual property rights, achieve the effect of improving reliability and security, and ensuring safety and reliability

Active Publication Date: 2017-04-26
赵志铎
View PDF4 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since bytecode files are serialized files that can be parsed, there are already many excellent decompilation tools such as uncompyle2, Decompile++ can decompile most bytecode files and obtain highly readable Python source code , attackers can use these tools to decompile bytecode files to obtain key information about algorithms and execution logic implemented in Python programs, infringing on the intellectual property rights of Python software

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Python byte code file protection method based on module hook
  • Python byte code file protection method based on module hook
  • Python byte code file protection method based on module hook

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] In this embodiment, a method for protecting Python bytecode files based on module hooks is applied between the developer and the client; the client uses the Python interpreter to execute the main program of the Python application provided by the developer; The application program includes the main program and several Python bytecode files; the main program imports several Python bytecode files by default during execution, so as to obtain the execution results of the Python application program; for example figure 1 As shown, the technical solution of the present invention can enable users to run applications containing encrypted bytecode files like applications using unencrypted bytecode files without affecting the normal operation of the application. The steps of running the Python application program of the code file, and the solid line is the running steps of the Python application program felt by the user.

[0039] Specifically, the Python bytecode file protection me...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a Python byte code file protection method based on a module hook. The method comprises the following steps: 1, performing encryption processing on a Python byte code file; 2, designing a Python module hook and a corresponding registration script; 3, adding the Python module hook and the corresponding registration script to a source code file of a Python interpreter of a client; 4, releasing a main program and the encrypted Python byte code file to the client by a developer terminal, and providing a new source code file of the Python interpreter; 5, compiling the source code file of the Python interpreter with the Python module hook and the corresponding registration script added to obtain a compiled Python interpreter; and 6, executing the main program by the client by using the compiled Python interpreter. By adoption of the Python byte code file protection method disclosed by the invention, decompilation is effectively defended, and the protection strength of Python software programs is improved.

Description

technical field [0001] The invention relates to the field of software protection, in particular to a method for protecting Python bytecode files. Background technique [0002] Python is an object-oriented, interpreted computer programming language. It has the characteristics of efficient development and easy use. It has been used by a large number of companies to implement applications and large websites. Python source code is not compiled into binary files like C / C++ source code. The python interpreter first compiles the python file into bytecode, which is expressed as a .pyc file. After the bytecode file is loaded, it will be interpreted and executed by the interpreter. The code file contains bytecode sequence information, and also stores a lot of python program runtime information including defined strings, constants, etc. Since bytecode files are serialized files that can be parsed, there are already many excellent decompilation tools such as uncompyle2, Decompile++ can...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/14
CPCG06F21/14
Inventor 顾乃杰陈悟王小强王岩
Owner 赵志铎
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products