Skip to content

Instantly share code, notes, and snippets.

@fox-srt
Created November 10, 2023 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fox-srt/da81fc26517d8670a91a66e445cfc914 to your computer and use it in GitHub Desktop.
Save fox-srt/da81fc26517d8670a91a66e445cfc914 to your computer and use it in GitHub Desktop.
# As the fields are aligned, we need to parse them individually
offset = fh.tell()
for _ in range(field_count):
# Align
offset = (offset + 3) & 0xFFFFFFFC
fh.seek(offset)
# Parse
field = c_defender.QuarantineEntryResourceField(fh)
self._add_field(field)
# Move pointer
offset += 4 + field.Size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment