Skip to content

Conversation

@atlas0fd00m
Copy link
Contributor

currently MemObjFile is decentish for loading PE's from memory/vsnapshots.
supporting ELF will take some reworking, as the PE maps tend to be adjacent, whereas some architectures like to space ELF maps out by a couple MB of virtual address space

…itial size to offset

tweaks:  added concept of the file's maps, and the "end", as well as giving seek() the "whence" option.
  whence et al were added from an older stash, written before the rest... it's possible we want to merge the two things better.
size = msize - self.offset
offset = 0

while True:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to getSize, is there a reason you calculate self.basemaps but then never use it? Are you expecting the maps to change (and if so, is there a way we can keep state in sync so we can simply a lot of this checking)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: access self.basemaps

offset += msize

if osize is None:
logger.info("read() reading from 0x%x: 0x%x", self.baseaddr + self.offset, size)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this is a separate conditional instead of being under if size is None?

@rakuy0 rakuy0 mentioned this pull request Aug 26, 2024
@rakuy0 rakuy0 added this to the v1.3.0 milestone Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants