Skip to content

Commit

Permalink
Add write memory function
Browse files Browse the repository at this point in the history
  • Loading branch information
axi0mX committed May 29, 2017
1 parent 7648a9d commit 0ba425d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ipwndfu
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ class PwnedDFUDevice():
(retval, data) = self.execute(struct.pack('<4I', self.config.memmove, self.config.load_address + 8, address, length), length)
return data

def write_memory(self, address, data):
(retval, data) = self.execute(struct.pack('<4I%ss' % len(data), self.config.memmove, address, self.config.load_address + 20, len(data), data), 0)
return data

def nor_dump(self, saveBackup):
(bdev, empty) = self.execute(struct.pack('<2I5s', self.config.get_block_device, self.config.load_address + 12, 'nor0\x00'), 0)
if bdev == 0:
Expand Down

0 comments on commit 0ba425d

Please sign in to comment.