Skip to content

Conversation

VulnX
Copy link

@VulnX VulnX commented Oct 10, 2025

Closes: #2634

What does this PR add?

This PR adds an overlap() method to the existing FileStructure class which allows the user to merge 2 FileStructure objects. This is particularly useful when we have overlapping structs linked via the ->chain field.

Apart from the main overlap() method, for convenience, this PR also introduces 2 new methods:

  1. from_bytes() - a class method which allows the user to create a FileStructure object from a byte string
  2. offsets() - exports the architecture-specific offsets for all fields of the struct. This will also be very helpful in case the user wants to manually construct the fields with flat(), and use sane names like offsets['vtable'] instead of hard-coded numbers like 216

Does this PR modify any existing code?

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overlap 2 file pointer structures for FSOP

1 participant