コード例 #1
0
 def __init__(self, data):
     BinaryView.__init__(self, file_metadata=data.file, parent_view=data)
     self.raw = data
     if data.file.filename.endswith('.bin.16'):
         orig_file = data.file.filename[:-3]
         global strings
         strings = find_strings(orig_file)
コード例 #2
0
ファイル: srec_view.py プロジェクト: novafacing/hexfiles
 def __init__(self, data: BinaryView):
     actual_data = data.read(0, len(data)).decode('utf8')
     binfile = BinFile()
     binfile.add(actual_data)
     decoded = b''.join(s.data for s in binfile.segments)
     parent = BinaryView.new(data=decoded)
     self.hex_segments = binfile.segments
     BinaryView.__init__(self, file_metadata=data.file, parent_view=parent)
コード例 #3
0
ファイル: ProcessView.py プロジェクト: Vector35/debugger
 def __init__(self, parent):
     BinaryView.__init__(self,
                         parent_view=parent,
                         file_metadata=parent.file)
     self.value_cache = {}
     self.error_cache = {}
     self.arch = parent.arch
     self.platform = parent.platform
コード例 #4
0
ファイル: dumb_view.py プロジェクト: hydra45/DUMB
    def __init__(self, data):
        """
        Once our view is selected, this method is called to actually create it.
        :param data: the file data
        """
        BinaryView.__init__(self, file_metadata=data.file, parent_view=data)
        self.platform = Architecture['DUMB'].standalone_platform

        self.parse_format(data)
コード例 #5
0
	def __init__(self, parent):
		self.memory = DebugMemoryView(parent)
		self.local_view = parent
		BinaryView.__init__(self, parent_view=self.memory, file_metadata=self.memory.file)
		self.arch = parent.arch
		self.platform = parent.platform

		self.saved_bases = {}

		# TODO: Read segments from debugger
		length = self.memory.perform_get_length()
		self.add_auto_segment(0, length, 0, length, SegmentFlag.SegmentReadable | SegmentFlag.SegmentWritable | SegmentFlag.SegmentExecutable)
		self.add_auto_section("Memory", 0, length)
コード例 #6
0
 def __init__(self, data):
     """
     Create memory map segments for the image
     We use only the ROM data, no additional data is mapped.
     Interpreter segment is not loaded to not confuse the user when looking at the image in the hex viewer
     """
     BinaryView.__init__(self, parent_view=data, file_metadata=data.file)
     self.platform = Architecture['CHIP-8'].standalone_platform
     self.data = data
     self.add_auto_segment(0x200, len(data), 0, len(data), SegmentFlag.SegmentReadable | SegmentFlag.SegmentWritable | SegmentFlag.SegmentExecutable | SegmentFlag.SegmentContainsCode)
     self.add_user_section('ROM Data', 0x200, len(data), SectionSemantics.ReadOnlyCodeSectionSemantics)
     self.add_entry_point(0x200)
     self.get_function_at(0x200).name = 'entry'
コード例 #7
0
 def __init__(self, data):
     BinaryView.__init__(self, parent_view=data, file_metadata=data.file)
     self.raw = data
コード例 #8
0
    def __init__(self, data):
        BinaryView.__init__(self, data.file, data)

        self.arch = Architecture['m16c']
        self.platform = Platform['m16c']
コード例 #9
0
 def __init__(self, data):
     BinaryView.__init__(self, file_metadata=data.file, parent_view=data)
     self.platform = Architecture["thumb2"].standalone_platform
     self._parse_format(data)
コード例 #10
0
 def __init__(self, data):
     # Binary Ninja apparently looks at the file metadata for the parent view, so we have to bind that to a Binary View as well
     self.file = FileMetadata(filename="/dev/null")
     BinaryView.__init__(self, file_metadata=self.file, parent_view=BinaryView(file_metadata=self.file), handle=None)
     self.raw = data