Blob

class cle.backends.blob.Blob[source]

Bases: Backend

Representation of a binary blob, i.e. an executable in an unknown file format.

is_default = True
__init__(*args, offset=None, segments=None, **kwargs)[source]
Parameters:
  • arch – (required) an archinfo.Arch for the binary blob.

  • offset – Skip this many bytes from the beginning of the file.

  • segments – List of tuples describing how to map data into memory. Tuples are of (file_offset, mem_addr, size).

You can’t specify both offset and segments.

static is_compatible(stream)[source]

Determine quickly whether this backend can load an object from this stream

property min_addr

This returns the lowest virtual address contained in any loaded segment of the binary.

property max_addr

This returns the highest virtual address contained in any loaded segment of the binary.

function_name(addr)[source]

Blobs don’t support function names.

contains_addr(addr)[source]

Is addr in one of the binary’s segments/sections we have loaded? (i.e. is it mapped into memory ?)

in_which_segment(addr)[source]

Blobs don’t support segments.

classmethod check_compatibility(spec, obj)[source]

Performs a minimal static load of spec and returns whether it’s compatible with other_obj