LIEF icon indicating copy to clipboard operation
LIEF copied to clipboard

Builder results as string/list of bytes

Open zangobot opened this issue 4 years ago • 1 comments

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.

zangobot avatar Oct 03 '19 11:10 zangobot

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.

martsa1 avatar May 04 '22 17:05 martsa1

There is now the get_build method.

romainthomas avatar Apr 08 '23 12:04 romainthomas