tmr232/Sark

getting the bytes of the line object

Closed this issue · 5 comments

I propose to add a property to a line object.
A property that will return the bytes of the object.
something like:
return idaapi.get_many_bytes(self.ea, self.size)

This sounds like a good idea. I'll look into it when I have the time.

It will probably be an iterable named line.bytes or something similar.

what's wrong with "get_many_bytes()" ?

Most getters in Sark are implemented as properties. So it makes more sense to make this one a property too. get_many_bytes is a weird name for one.

I agree.
I didn't mean to name it get_many_bytes though.
I meant using idaapi.get_many_bytes() and returning the result instead of an iterator/generator.
line.bytes is perfect imho.

That makes sense. I'll try and get to it soon. Feel free to submit a PR.