Skip to content

create a personal python interpreter #97587

@twilight2017

Description

@twilight2017

Feature or enhancement

Creating a private python interpreter using opcode permutation strategy
(A clear and concise description of your proposal.)
I want to create a private python interpreter by exchanging opcodes , aims to increase the difficulty of cracking the pyc file, we make a private python environment(private python)。
I made a little attempt first and I tested is 3.9.6:
swap the opcode of the two operations of BINARY_ADD and BINARY_SUBTRACT's opcode
My modification policy has the following three places:
1.Include/opcode.h:swap bytecode definitions:
image
2. Lib/opcoe.py: exchange the opcode:
image
3.Python: opcode_targets .h: swap the order of the two opcodes in the swap
image
I would appreciate it if someone can provide me with some help
#problem
Unfortunately, after such a modification has been made, the python compilation precess failed。The error message is shown in the following figure:
lQLPJxa42KP0z2jNAWTNBVawjsj6xfVo-2YDL-schECkAA_1366_356

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions