Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PyMemoryEditor/win32/enums/memory_protections.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MemoryProtectionsEnum(Enum):
PAGE_READWRITE = 0x04

# Indicates memory page is readable. (Custom constant)
PAGE_READABLE = PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_READWRITE
PAGE_READABLE = PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_READWRITE | PAGE_READONLY

# Indicates memory page is readable and writeable. (Custom constant)
PAGE_READWRITEABLE = PAGE_EXECUTE_READWRITE | PAGE_READWRITE
Expand Down
3 changes: 2 additions & 1 deletion PyMemoryEditor/win32/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def SearchAddressesByValue(

# Only committed, non-shared and readable memory pages.
if region["struct"].State != MemoryAllocationStatesEnum.MEM_COMMIT.value: continue
if region["struct"].Type != MemoryTypesEnum.MEM_PRIVATE.value: continue
if (region["struct"].Type != MemoryTypesEnum.MEM_PRIVATE.value and
region["struct"].Type != MemoryTypesEnum.MEM_IMAGE.value): continue
if region["struct"].Protect & MemoryProtectionsEnum.PAGE_READABLE.value == 0: continue

# If writeable_only is True, checks if the memory page is writeable.
Expand Down