You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm a beginner, my English is not good.I now have a good pe generated
files. I want to fill it to add a zip package. . I'm running on linux. I hope
to get your help?
email 460457528@qq.com
Original issue reported on code.google.com by 460457...@qq.com on 23 Aug 2013 at 4:16
The text was updated successfully, but these errors were encountered:
//Create PE image from file stream
pe_base image(pe_factory::create_pe(pe_file));
//Get Resource Manager
resource_directory root(get_resources(image));
pe_resource_manager res(root);
//Change the name of the old resource section (Not Sure if this is neccesary)
image.section_from_directory(pe_win::image_directory_entry_resource).set_name("o
ldres");
//Add the resource by providing data, a root name, resource id, language, ...
res.add_resource(<-Some Binary Data Here->, L"BIN", 205, 1033,0,0);
//Create new resource section and add it to the image
section new_resources;
new_resources.get_raw_data().resize(1);
new_resources.set_name(".rsrc");
new_resources.readable(true);
section& attached_section = image.add_section(new_resources);
//Rebuild the resources
rebuild_resources(image, root, attached_section);
//Build the new executable by providing file stream to write new PE to
rebuild_pe(image, new_pe_file);
Original comment by Damian.D...@gmail.com on 28 Nov 2013 at 10:14
Original issue reported on code.google.com by
460457...@qq.com
on 23 Aug 2013 at 4:16The text was updated successfully, but these errors were encountered: