LIEF
LIEF copied to clipboard
Builder results as string/list of bytes
Is your feature request related to a problem? Please describe. I would need to obtain the results of the builder directly in memory and not storing it into a file and loading them back. (I'm working on PE files, but this could be applied to all formats)
Describe the solution you'd like
The write
method of the Builder could have an optional parameter to set this behavior, or create a new method that returns the built binary as byte string / array / whatever.
I'd quite like to see something like this also.
One common approach in python at least, would be to support the file protocol, which would let us use a BytesIO
with the write
function for instance.
There is now the get_build method.