File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -180,22 +180,22 @@ def check_control_flow(binary) -> bool:
180180
181181
182182CHECKS = {
183- ' ELF' : [
183+ lief . EXE_FORMATS . ELF : [
184184 ('PIE' , check_PIE ),
185185 ('NX' , check_NX ),
186186 ('RELRO' , check_ELF_RELRO ),
187187 ('Canary' , check_ELF_Canary ),
188188 ('separate_code' , check_ELF_separate_code ),
189189],
190- 'PE' : [
190+ lief . EXE_FORMATS . PE : [
191191 ('PIE' , check_PIE ),
192192 ('DYNAMIC_BASE' , check_PE_DYNAMIC_BASE ),
193193 ('HIGH_ENTROPY_VA' , check_PE_HIGH_ENTROPY_VA ),
194194 ('NX' , check_NX ),
195195 ('RELOC_SECTION' , check_PE_RELOC_SECTION ),
196196 ('CONTROL_FLOW' , check_PE_control_flow ),
197197],
198- ' MACHO' : [
198+ lief . EXE_FORMATS . MACHO : [
199199 ('PIE' , check_PIE ),
200200 ('NOUNDEFS' , check_MACHO_NOUNDEFS ),
201201 ('NX' , check_NX ),
@@ -210,7 +210,7 @@ def check_control_flow(binary) -> bool:
210210 for filename in sys .argv [1 :]:
211211 try :
212212 binary = lief .parse (filename )
213- etype = binary .format . name
213+ etype = binary .format
214214 if etype == lief .EXE_FORMATS .UNKNOWN :
215215 print (f'{ filename } : unknown executable format' )
216216 retval = 1
You can’t perform that action at this time.
0 commit comments