Exemplo n.º 1
0
    def __init__(self, filename=None, handle=None):
        """
		Instantiates a new FileMetadata class.

		:param filename: The string path to the file to be opened. Defaults to None.
		:param handle: A handle to the underlying C FileMetadata object. Defaults to None.
		"""
        if handle is not None:
            self.handle = core.handle_of_type(handle, core.BNFileMetadata)
        else:
            binaryninja._init_plugins()
            self.handle = core.BNCreateFileMetadata()
            if filename is not None:
                core.BNSetFilename(self.handle, str(filename))
        self._nav = None
Exemplo n.º 2
0
 def filename(self, value):
     core.BNSetFilename(self.handle, str(value))