MCPcopy Create free account
hub / github.com/Vector35/debugger / write_memory

Method write_memory

api/python/debuggercontroller.py:607–621  ·  view source on GitHub ↗

Write memory of the target. One can also get the ``live_view`` BinaryView of the DebuggerController, and use ordinary write methods to write its content. :param address: address to write to :param buffer: buffer of data to write. It can be either bytes or a

(self, address: int, buffer)

Source from the content-addressed store, hash-verified

605 return binaryninja.DataBuffer(handle=buffer)
606
607 def write_memory(self, address: int, buffer) -> bool:
608 """
609 Write memory of the target.
610
611 One can also get the ``live_view`` BinaryView of the DebuggerController, and use ordinary write methods to write
612 its content.
613
614 :param address: address to write to
615 :param buffer: buffer of data to write. It can be either bytes or a DataBuffer
616 :return: True on success, False on failure.
617 """
618 if isinstance(buffer, bytes):
619 buffer = binaryninja.DataBuffer(buffer)
620 buffer_obj = ctypes.cast(buffer.handle, ctypes.POINTER(dbgcore.BNDataBuffer))
621 return dbgcore.BNDebuggerWriteMemory(self.handle, address, buffer_obj)
622
623 @property
624 def processes(self) -> List[DebugProcess]:

Callers 1

Calls

no outgoing calls

Tested by 1