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:
180
180
181
181
182
182
CHECKS = {
183
- ' ELF' : [
183
+ lief . EXE_FORMATS . ELF : [
184
184
('PIE' , check_PIE ),
185
185
('NX' , check_NX ),
186
186
('RELRO' , check_ELF_RELRO ),
187
187
('Canary' , check_ELF_Canary ),
188
188
('separate_code' , check_ELF_separate_code ),
189
189
],
190
- 'PE' : [
190
+ lief . EXE_FORMATS . PE : [
191
191
('PIE' , check_PIE ),
192
192
('DYNAMIC_BASE' , check_PE_DYNAMIC_BASE ),
193
193
('HIGH_ENTROPY_VA' , check_PE_HIGH_ENTROPY_VA ),
194
194
('NX' , check_NX ),
195
195
('RELOC_SECTION' , check_PE_RELOC_SECTION ),
196
196
('CONTROL_FLOW' , check_PE_control_flow ),
197
197
],
198
- ' MACHO' : [
198
+ lief . EXE_FORMATS . MACHO : [
199
199
('PIE' , check_PIE ),
200
200
('NOUNDEFS' , check_MACHO_NOUNDEFS ),
201
201
('NX' , check_NX ),
@@ -210,7 +210,7 @@ def check_control_flow(binary) -> bool:
210
210
for filename in sys .argv [1 :]:
211
211
try :
212
212
binary = lief .parse (filename )
213
- etype = binary .format . name
213
+ etype = binary .format
214
214
if etype == lief .EXE_FORMATS .UNKNOWN :
215
215
print (f'{ filename } : unknown executable format' )
216
216
retval = 1
You can’t perform that action at this time.
0 commit comments