Why was the modification of the export function name unsuccessful
icyfox168168 opened this issue · comments
icyfox168168 commented
Please describe what you would like to have in LIEF.
Note: If the feature is not precise or if you want to have feedback first, you can open a discussion.
// 加载 DLL 文件
auto binary = LIEF::PE::Parser::parse(dll_path);
// 获取导出表
auto export_table = binary->get_export();
// 获取导出函数的名称
std::vector<std::string> export_functions;
for (const auto& entry : export_table.entries()) {
std::string func_name = entry.name();
export_functions.push_back(func_name);
}
export_table.entries()[1].name("NewFunction");
binary->write("modified_example.dll");