mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 10:42:23 +02:00
contrib: simplify PE test-security-check
This commit is contained in:
@ -130,7 +130,7 @@ def check_PE_RELOC_SECTION(binary) -> bool:
|
||||
'''Check for a reloc section. This is required for functional ASLR.'''
|
||||
return binary.has_relocations
|
||||
|
||||
def check_PE_control_flow(binary) -> bool:
|
||||
def check_PE_CONTROL_FLOW(binary) -> bool:
|
||||
'''
|
||||
Check for control flow instrumentation
|
||||
'''
|
||||
@ -145,7 +145,7 @@ def check_PE_control_flow(binary) -> bool:
|
||||
return True
|
||||
return False
|
||||
|
||||
def check_PE_Canary(binary) -> bool:
|
||||
def check_PE_CANARY(binary) -> bool:
|
||||
'''
|
||||
Check for use of stack canary
|
||||
'''
|
||||
@ -216,8 +216,8 @@ BASE_PE = [
|
||||
('HIGH_ENTROPY_VA', check_PE_HIGH_ENTROPY_VA),
|
||||
('NX', check_NX),
|
||||
('RELOC_SECTION', check_PE_RELOC_SECTION),
|
||||
('CONTROL_FLOW', check_PE_control_flow),
|
||||
('Canary', check_PE_Canary),
|
||||
('CONTROL_FLOW', check_PE_CONTROL_FLOW),
|
||||
('CANARY', check_PE_CANARY),
|
||||
]
|
||||
|
||||
BASE_MACHO = [
|
||||
|
Reference in New Issue
Block a user