From 18268ce2c5fbc0d0edd0bf5a8b428fc768c60f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E6=BA=90?= <40438607+Reset816@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:50:35 +0800 Subject: [PATCH] Fix incorrect comparison in runpayload method Corrected the if statement to properly compare the response_ack with the expected ack value. --- mtkclient/Library/pltools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mtkclient/Library/pltools.py b/mtkclient/Library/pltools.py index 5c27bd27..28cb39ff 100755 --- a/mtkclient/Library/pltools.py +++ b/mtkclient/Library/pltools.py @@ -75,12 +75,12 @@ def runpayload(self, filename, offset=0, ack=0xA1A2A3A4, addr=None, dontack=Fals self.info(f"Couldn't open {filename} for reading.") return False - ack = self.exploit.runpayload(payload, ack, addr, dontack) - if ack == ack: + response_ack = self.exploit.runpayload(payload, ack, addr, dontack) + if response_ack == ack: self.info(f"Successfully sent payload: {filename}") self.mtk.daloader.patch = True return True - elif ack == b"\xc1\xc2\xc3\xc4": + elif response_ack == b"\xc1\xc2\xc3\xc4": if "preloader" in rf.name: ack = self.mtk.port.usbread(4) if ack == b"\xC0\xC0\xC0\xC0":