Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python API missing set_resources() #1048

Open
iler-dev opened this issue Apr 25, 2024 · 3 comments
Open

Python API missing set_resources() #1048

iler-dev opened this issue Apr 25, 2024 · 3 comments
Assignees
Labels

Comments

@iler-dev
Copy link

Describe the bug
The python API lacks a binding for the C++ method Binary::set_resources() in regards to the PE binary. As such, it is not possible to add a resource tree to a PE binary that does not already have one.

To Reproduce

import lief
binary = lief.parse("exe-with-no-resources.exe")

assert not binary.has_resources

binary.set_resources(lief.PE.ResourceDirectory()) # AttributeError

assert binary.has_resources

Expected behavior
A way to invoke Binary::set_resources() through the python API to add a resource tree to a binary without one.

Environment (please complete the following information):

  • System and Version : MacOS Sonoma
  • Target format: PE
  • LIEF commit version: 0.14.1-bae887e0

NOTICE

If the issue does not contain enough information to be reproduced,
it will be flagged as incomplete
and closed.

/NOTICE

@romainthomas
Copy link
Member

Hi @iler-dev
Yes this api is not exposed in Python because it is not enough stable.

@iler-dev
Copy link
Author

Thanks for the quick response @romainthomas! Just for clarification, is just set_responses() that is considered unstable or the resources API's in general?

If it helps, I having been experimenting with set_resources() and I have not observed any bugs or issues with set_resources() or Lief in general in my testing so far.

@romainthomas
Copy link
Member

The resource API for modification should be considered as unstable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants