pydis

Crates.iopydis
lib.rspydis
version0.4.0
sourcesrc
created_at2020-12-12 04:52:21.857209
updated_at2021-08-12 01:58:32.797866
descriptionPython 2.7 bytecode disassembler
homepage
repositoryhttps://github.com/landaire/pydis
max_upload_size
id322076
size36,637
Lander Brandt (landaire)

documentation

https://docs.rs/pydis

README

crates.io

pydis

A Rust crate for disassembling Python 2.7 bytecode

Example Usage

use pydis::prelude::*;
use pydis::opcode::py27::Standard;

fn disassemble(bytecode: &[u8]) {
    let mut rdr = std::io::Cursor::new(bytecode);
    // Decode using the standard Python 2.7 opcode table.
    // A custom opcode table can be passed by calling `decode::<OpcodeTable, _>(source)`
    while let Ok(instr) = decode_py27::<Standard, _>(&mut rdr) {
        println!("{:#?}", instr);
    }
}
Commit count: 23

cargo fmt