-
Notifications
You must be signed in to change notification settings - Fork 191
MemObjFile parsing fixes #665
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
base: master
Are you sure you want to change the base?
Conversation
…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.
vstruct/__init__.py
Outdated
| size = msize - self.offset | ||
| offset = 0 | ||
|
|
||
| while True: |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: access self.basemaps
vstruct/__init__.py
Outdated
| offset += msize | ||
|
|
||
| if osize is None: | ||
| logger.info("read() reading from 0x%x: 0x%x", self.baseaddr + self.offset, size) |
There was a problem hiding this comment.
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?
Co-authored-by: atlas0fd00m <atlas@r4780y.com>
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