Skip to content

[fix] Section Characteristics #3

@aiymka99

Description

@aiymka99

packed_section.characteristics = (lief.PE.SECTION_CHARACTERISTICS.MEM_READ
| lief.PE.SECTION_CHARACTERISTICS.MEM_WRITE
| lief.PE.SECTION_CHARACTERISTICS.CNT_INITIALIZED_DATA)

This part of the code raises this error: "AttributeError: module lief._lief.PE has no attribute 'SECTION_CHARACTERISTICS'". I fixed it with the following code and it works.

packed_section.characteristics = (
0x40000000 | # MEM_READ
0x80000000 | # MEM_WRITE
0x00000040 # CNT_INITIALIZED_DATA
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions