mirror of
https://github.com/brain-hackers/lab
synced 2024-12-22 04:00:04 +09:00
extract.py: exit on error
This commit is contained in:
parent
6001ad21cf
commit
1559a0e69b
@ -17,6 +17,7 @@ def extract(elf):
|
||||
text = elf.get_section_by_name('.text')
|
||||
if text is None:
|
||||
print('Input ELF has no .text section', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
with open(sys.argv[2], 'wb') as f:
|
||||
elf.stream.seek(0)
|
||||
|
Loading…
Reference in New Issue
Block a user