SkillAgentSearch skills...

Pyasm

A bytecode-engineering library for python 3.11

Install / Use

/learn @0x3C50/Pyasm
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

PyAsm

A bytecode-engineering library for python 3.11.

Installing

This project does not have a pip package (yet). To install it, the assembler.py file needs to be copied into the project it's used in.

Usage

This library (obviously) requires a lot of knowledge about python's bytecode syntax. If you're unsure about certain things, you can use python's compile combined with dis to figure certain things out. Here's an example:

import dis
def dump(source):
    compiled = compile(source, "", "exec")
    dis.dis(compiled)
dump("print(123)")

The examples.py file contains examples on how to use the library. The documentation in the library itself also contains some useful help.

Documentation

Documentation on the specific instructions can be found at the dis python docs.

If you wonder how specific python snippets look like in bytecode, refer to usage

Notes

  • The resulting assembly generated by this project needs to be run with python 3.11. No version below 3.11 will be able to parse the bytecode generated with this libary, due to pretty significant changes to the format.
View on GitHub
GitHub Stars11
CategoryDevelopment
Updated2mo ago
Forks0

Languages

Python

Security Score

75/100

Audited on Jan 27, 2026

No findings