From a77cc9d1080d1cb7bf7d10fa83fd525db80407aa Mon Sep 17 00:00:00 2001 From: Cameron12533439 Date: Fri, 6 Aug 2021 09:44:28 -0400 Subject: [PATCH] Fix AssertionError when sending iBSS Changed MAX_SHELLCODE_LENGTH = 128 to MAX_SHELLCODE_LENGTH = 132 since the iBSS payload is now 132 bytes instead of 128 bytes. --- dfuexec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dfuexec.py b/dfuexec.py index af15d0b5..862cd714 100644 --- a/dfuexec.py +++ b/dfuexec.py @@ -269,7 +269,7 @@ def boot_ibss(self): def flash_nor(self, nor): self.boot_ibss() print 'Sending iBSS payload to flash NOR.' - MAX_SHELLCODE_LENGTH = 128 + MAX_SHELLCODE_LENGTH = 132 payload = open('bin/ibss-flash-nor-shellcode.bin', 'rb').read() assert len(payload) <= MAX_SHELLCODE_LENGTH payload += '\x00' * (MAX_SHELLCODE_LENGTH - len(payload)) + nor @@ -311,4 +311,4 @@ def decrypt_keybag(self, keybag): f.write(keybag + decrypted_keybag) f.close() - return decrypted_keybag \ No newline at end of file + return decrypted_keybag