Commit 5e0d7cf0 by devttys0

Added size check for arcadyan decryptor

parent c58d9e1c
......@@ -42,9 +42,12 @@ class ArcadyanDeobfuscator(binwalk.core.plugin.Plugin):
fname = os.path.abspath(fname)
infile = binwalk.core.common.BlockFile(fname, "rb")
obfuscated = infile.read()
obfuscated = infile.read(self.MIN_FILE_SIZE)
infile.close()
if os.path.getsize(fname) > self.MAX_IMAGE_SIZE:
raise Exception("Input file too large for Arcadyan obfuscated firmware")
if len(obfuscated) >= self.MIN_FILE_SIZE:
# Swap blocks 1 and 2
p1 = obfuscated[self.P1_START:self.P1_END]
......
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