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

Operation code replacement and combination-based Python script program anti-reversal method

A script program and opcode technology, applied in program control design, program/content distribution protection, software engineering design, etc., can solve problems such as loss of developers and users, reduce application size, increase security, and strengthen security guarantees Effect

Active Publication Date: 2017-03-15
泉州一班人科技有限公司
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] At present, applications developed using the Python scripting language are easily decompiled into source code files by attackers, causing losses to developers and users. These are related to the organizational format of bytecode files.

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
  • Operation code replacement and combination-based Python script program anti-reversal method
  • Operation code replacement and combination-based Python script program anti-reversal method
  • Operation code replacement and combination-based Python script program anti-reversal method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] The Python script program anti-reversal method for replacing and merging the virtual machine operation code based on the single-table substitution cipher and the Playfair cipher will be further described in detail below through specific embodiments in conjunction with the accompanying drawings.

[0034] In this embodiment, a Python script program anti-reversal method based on opcode replacement and merging is applied to Python source code files. These Python source code files include opcode mapping opcode.h files and peephole optimization peephole.c files and the virtual machine ceval.c file; the opcode is n natural numbers defined in the opcode.h file; these n natural numbers correspond to the n virtual machine operations involved in the ceval.c file;

[0035] Define the set of n virtual machine operations as: OP={op 1 ,op 2 ,...,op i ,...,op n}, op i Indicates the i-th virtual machine operation, which is an operation with specific semantic information such as LOAD...

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 an operation code replacement and combination-based Python script program anti-reversal method, which comprises the following steps: 1, analyzing generation and actuating logic of an operation code in a Python interpreter and a virtual machine; 2, changing an operation code mapping (opcode.h) unit; 3, analyzing basic block information in an operation code sequence in a bytecode file generated by compiling; 4, defining a new operation code; 5, changing a peephole optimization (peephole.h) unit, and carrying out combination on two (or more) operation codes located in the same basic block to form a new operation code; 6, changing a virtual machine (ceval.h) unit, so as to support the interpretive execution on the new operation code; 7, determining an operation code value by the Python virtual machine, knowing that the operation code has already been subjected to replacement and combination, and adopting a corresponding interpretation process to carry out the interpretive execution on the operation code; 8, normally executing a Python script program.

Description

technical field [0001] The invention relates to the technical field of software code protection, in particular to a Python script program anti-reversal method based on a single-table substitution cipher and a Playfair cipher for replacing and merging virtual machine operation codes. Background technique [0002] A Python script program is an application program developed using the Python scripting language. The application (app.py) developed using the python scripting language must first be compiled into a bytecode file (app.pyc) with a specific structure through the Python script compiler, and then the bytecode file (app.pyc) Published to the client to run. [0003] The bytecode (.pyc) file generated by compiling an application developed using the Python scripting language is not a binary file for a specific processor and system, but a file with a specific structure and characteristics for the Python Virtual Machine (Python Virtual Machine) , which preserves all the infor...

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
IPC IPC(8): G06F21/14G06F9/45
CPCG06F8/4441G06F21/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