From 786fc36c4fbc6a1b4a909042511959dee2fa156b Mon Sep 17 00:00:00 2001 From: ValekoZ Date: Wed, 29 May 2024 23:30:52 +0200 Subject: [PATCH] [libc] Fix `find_libc_version` for checking each readable maps --- gef.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gef.py b/gef.py index 22b9b5e94..234870ce7 100644 --- a/gef.py +++ b/gef.py @@ -11505,7 +11505,7 @@ def version(self) -> Optional[Tuple[int, int]]: @lru_cache() def find_libc_version() -> Tuple[int, int]: """Attempt to determine the libc version. This operation can be long.""" - libc_sections = (m for m in gef.memory.maps if "libc" in m.path and m.permission == Permission.READ) + libc_sections = (m for m in gef.memory.maps if "libc" in m.path and m.permission & Permission.READ) for section in libc_sections: # Try to determine from the filepath match = re.search(GefLibcManager.PATTERN_LIBC_VERSION_FILENAME, section.path)