Skip to content

Commit

Permalink
Fix incorrect comparison in runpayload method
Browse files Browse the repository at this point in the history
Corrected the if statement to properly compare the response_ack with the expected ack value.
  • Loading branch information
Reset816 authored Jul 15, 2024
1 parent a789e6c commit 18268ce
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 18268ce

Please sign in to comment.