Update the patch function

Issue #3 resolved
Alexander Hanel repo owner created an issue

It would be more efficient to add an argument to the patch function that can take the newly updated buffer. This will remove the step of

Python>test.buffer = ''
Python>test.buffer = temp
Python>test.patch()

Instead it would be

Python>test.patch(temp)

Comments (1)

  1. Alexander Hanel reporter

    Completed. Added the optional argument and first two lines of code.

        def patch(self, temp = None):
            '''patch idb with data in fwrapper.buffer'''
        if temp != None:
            self.buffer = temp
            for index, byte in enumerate(self.buffer):
                 PatchByte(self.start+index, ord(byte))
    
  2. Log in to comment