Skip to content

Commit

Permalink
Reorder two headers
Browse files Browse the repository at this point in the history
Make the same order as on disk; for human readability.
  • Loading branch information
j-t-1 authored Dec 9, 2024
1 parent 4b3b1e2 commit a1d747f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2424,6 +2424,8 @@ class PE:
),
)

__IMAGE_NT_HEADERS_format__ = ("IMAGE_NT_HEADERS", ("I,Signature",))

__IMAGE_FILE_HEADER_format__ = (
"IMAGE_FILE_HEADER",
(
Expand All @@ -2437,11 +2439,6 @@ class PE:
),
)

__IMAGE_DATA_DIRECTORY_format__ = (
"IMAGE_DATA_DIRECTORY",
("I,VirtualAddress", "I,Size"),
)

__IMAGE_OPTIONAL_HEADER_format__ = (
"IMAGE_OPTIONAL_HEADER",
(
Expand Down Expand Up @@ -2513,7 +2510,10 @@ class PE:
),
)

__IMAGE_NT_HEADERS_format__ = ("IMAGE_NT_HEADERS", ("I,Signature",))
__IMAGE_DATA_DIRECTORY_format__ = (
"IMAGE_DATA_DIRECTORY",
("I,VirtualAddress", "I,Size"),
)

__IMAGE_SECTION_HEADER_format__ = (
"IMAGE_SECTION_HEADER",
Expand Down

0 comments on commit a1d747f

Please sign in to comment.