rust_pwntools 0.1.0

A Rust crate inspired by Pwntools, providing powerful tools for binary exploitation, reverse engineering, and CTF challenges.
Documentation
pub struct RopChain {
    gadgets: Vec<u64>,
}

impl RopChain {
    pub fn new() -> Self {
        RopChain { gadgets: Vec::new() }
    }

    pub fn add_gadget(&mut self, address: u64) {
        self.gadgets.push(address);
    }

    pub fn generate_payload(&self, padding: usize) -> Vec<u8> {
        let mut payload = vec![0u8; padding];
        for gadget in &self.gadgets {
            payload.extend_from_slice(&gadget.to_le_bytes());
        }
        payload
    }
}