rust_pwntools 0.1.0

A Rust crate inspired by Pwntools, providing powerful tools for binary exploitation, reverse engineering, and CTF challenges.
Documentation
pub fn p32(value: u32) -> Vec<u8> {
    value.to_le_bytes().to_vec()
}

pub fn p64(value: u64) -> Vec<u8> {
    value.to_le_bytes().to_vec()
}

pub fn u32(data: &[u8]) -> u32 {
    let mut array = [0; 4];
    array.copy_from_slice(&data[0..4]);
    u32::from_le_bytes(array)
}

pub fn u64(data: &[u8]) -> u64 {
    let mut array = [0; 8];
    array.copy_from_slice(&data[0..8]);
    u64::from_le_bytes(array)
}