angr.storage¶
- class angr.storage.DefaultMemory
Bases:
HexDumperMixin,SmartFindMixin,UnwrapperMixin,NameResolutionMixin,DataNormalizationMixin,SimplificationMixin,InspectMixin,ActionsMixinHigh,UnderconstrainedMixin,SizeConcretizationMixin,SizeNormalizationMixin,AddressConcretizationMixin,ActionsMixinLow,ConditionalMixin,ConvenientMappingsMixin,DirtyAddrsMixin,StackAllocationMixin,ConcreteBackerMixin,ClemoryBackerMixin,DictBackerMixin,PrivilegedPagingMixin,UltraPagesMixin,DefaultFillerMixin,SymbolicMergerMixin,PagedMemoryMixin
- class angr.storage.SimFile
Bases:
SimFileBase,DefaultMemoryThe normal SimFile is meant to model files on disk. It subclasses SimSymbolicMemory so loads and stores to/from it are very simple.
- Parameters:
name – The name of the file
content – Optional initial content for the file as a string or bitvector
size – Optional size of the file. If content is not specified, it defaults to zero
has_end – Whether the size boundary is treated as the end of the file or a frontier at which new content will be generated. If unspecified, will pick its value based on options.FILES_HAVE_EOF. Another caveat is that if the size is also unspecified this value will default to False.
seekable – Optional bool indicating whether seek operations on this file should succeed, default True.
writable – Whether writing to this file is allowed
concrete – Whether or not this file contains mostly concrete data. Will be used by some SimProcedures to choose how to handle variable-length operations like fgets.
- Variables:
has_end – Whether this file has an EOF
- __init__(name=None, content=None, size=None, has_end=None, seekable=True, writable=True, ident=None, concrete=None, **kwargs)
- property category
reg, mem, or file.
- Type:
Return the category of this SimMemory instance. It can be one of the three following categories
- property size
The number of data bytes stored by the file at present. May be a symbolic value.
- concretize(**kwargs)
Return a concretization of the contents of the file, as a flat bytestring.
- class angr.storage.SimMemoryObject
Bases:
objectA SimMemoryObject is a reference to a byte or several bytes in a specific object in memory. It should be used only by the bottom layer of memory.
- __init__(obj, base, endness, length=None, byte_width=8)
- is_bytes
- base
- length
- endness
- size()
- property variables
- property symbolic
- property last_addr
- includes(x)
- bytes_at(addr, length, allow_concrete=False, endness='Iend_BE')
Submodules