Skip to content

Little help with writing the modifications of an PE #394

@GanbaruTobi

Description

@GanbaruTobi

Hello, I just tried to use this crate.
I parsed an PE from memory into an PE and that seems to work. But how do I write the modified result? Thanks for any help

    let poptions = ParseOptions{ resolve_rva : false, parse_attribute_certificates : false};
    let mut pe_mem = goblin::pe::PE::parse_with_opts(memory_data, &poptions)?; 
    
    for section in &mut pe_mem.sections {
        section.pointer_to_raw_data = section.virtual_address;
        section.size_of_raw_data = section.virtual_size;
   }
   //write the modifications here.
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions