Skip to content

Commit

Permalink
Merge pull request #1108 from Reset816/patch-1
Browse files Browse the repository at this point in the history
Fix incorrect comparison in runpayload method
  • Loading branch information
bkerler authored Jul 22, 2024
2 parents a789e6c + 18268ce commit 554b963
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mtkclient/Library/pltools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 554b963

Please sign in to comment.