Commit fd55d7f7 by devttys0

Added support for an {end} signature tag

parent 5b359c62
......@@ -30,6 +30,7 @@ class SignatureResult(binwalk.core.module.Result):
self.invalid = False
self.once = False
self.overlap = False
self.end = False
# These are set by code internally
self.id = 0
......
# http://blogs.phoenix.com/phoenix_technologies_bios/\
# 2007/02/uefi_pi_10_firm.html
# http://blogs.phoenix.com/phoenix_technologies_bios/2007/02/uefi_pi_10_firm.html
40 string _FVH UEFI PI Firmware Volume
>32 ulequad >0xFFFFFFFF {invalid} unrealistic size
......
......@@ -167,13 +167,15 @@ class Signature(Module):
# validation
self.result(r=r)
# If a sigure specified the end tag, jump to the end of the file
if r.end == True:
r.jump = fp.size
# Is this a valid result and did it specify a jump-to-offset
# keyword, and are we doing a "smart" scan?
if r.valid and r.jump > 0 and not self.dumb_scan:
absolute_jump_offset = r.offset + r.jump
current_block_offset = relative_offset + r.jump
# print ("Jumping to: 0x%X (0x%X)..." %
# (absolute_jump_offset, current_block_offset))
# If the jump-to-offset is beyond the confines of the current block, seek the file to
# that offset and quit processing this block of data.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment