summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/python/checksec/mitigations.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/python/checksec/mitigations.py b/plugins/python/checksec/mitigations.py
index 1539fa7..f054fac 100644
--- a/plugins/python/checksec/mitigations.py
+++ b/plugins/python/checksec/mitigations.py
@@ -28,9 +28,9 @@ class ElfMitigations():
# -Wl,-z,execstack / -Wl,-z,noexecstack
- stack = self._fmt.find_program_by_type(ElfFormat.PT_GNU_STACK)
+ stack = self._fmt.find_program_by_type(ElfFormat.ElfProgramHeaderType.PT_GNU_STACK)
- status = stack is None or stack.p_flags & ElfFormat.PF_X
+ status = stack is None or stack.p_flags & ElfFormat.ElfProgramHeaderFlags.PF_X
return 'No' if status else 'Yes'
@@ -44,7 +44,7 @@ class ElfMitigations():
hdr = self._fmt.get_header()
- status = hdr.e_type == ElfFormat.ET_DYN
+ status = hdr.e_type == ElfFormat.ElfHeaderType.ET_DYN
return 'Yes' if status else 'No'
@@ -57,9 +57,9 @@ class ElfMitigations():
# -Wl,-z,relro / -Wl,-z,now
- prgm = self._fmt.find_program_by_type(ElfFormat.PT_GNU_RELRO)
+ prgm = self._fmt.find_program_by_type(ElfFormat.ElfProgramHeaderType.PT_GNU_RELRO)
- entry = self._fmt.find_dynamic_item_by_type(ElfFormat.DT_BIND_NOW)
+ entry = self._fmt.find_dynamic_item_by_type(ElfFormat.ElfSectionHeaderFlags.DT_BIND_NOW)
if prgm is None and entry is None:
status = 'No'