r.api : module documentation

Part of reven

The REVEN python API.

Provide a pythonic way to interact with a Reven project. This mainly provides an object oriented wrapper on the low level api, plus a few helper functions to make REVEN scripting more straightforward. A minimal caching mechanism is also implemented under the hood but it should be completely transparent for the interface users.

To use it, the first step is to connect to a running Reven project, for example on port 13370 of the host localhost:

>>> import reven
>>> p = reven.Project('localhost', 13370)

About properties

Field members in our python classes are typically encapsulated in properties. For instance, the private field Project._host can be read from Project.host. Properties are special methods that should not be called with parenthesis, e.g. Project.host, not Project.host(). To make this distinction clearer in our documentation, the documentation for a property always starts with the keyword Property: (e.g., see the properties host and port in Project's documentation).

About cache

Unless otherwise documented, API objects are "cached", meaning that their values are fetched from the server once at their initialization, and are immutable afterward.

While caching usually results in consistent behavior (and of course much better performance), it can occasionally produce surprising effects.

For instance, the static comment of an Instruction is retrieved during the initialization of the Instruction instance, meaning that it won't be updated for a particular instance of an Instruction, even if another user sets the comment to another value. If you need to work with fresher values, you usually have to refresh your connection by using the Project.refresh methods, and then recreate all instances of other objects from this refreshed connection.

Missing native api binding

A few low-level objects are not exposed yet:

Use the reven_api module to use those objects.

Changelog

Every notable changes to this api will be documented in this file.

1.4.2

1.4.1

1.4.0

0.0.1 - 2016-04-01 (with REVEN 1.3.0)

Class ConcurrentAccessError Occurs when a modification to a shared resource is attempted, if another connection already modified the resource since the cache was last refreshed.
Class TaintDiff A taint propagation diff. It stores which elements either gain or loss the taint.
Class Taint The result of a taint propagation on a trace.
Class Criterion Criterion base class. Shouldn't be instanciated.
Class AddressCriterion Criterion object to select addresses.
Class BinaryCriterion Criterion object to select binaries.
Class SymbolCriterion Criterion object to select symbols.
Class DeviceCriterion Criterion object to select devices.
Class Report A report given by inspectors about an execution. Can signal: - potential bugs detected in the trace (such as *use-after-free*s). - *execute-after-write*s
Class FrameBuffer Video framebuffer information.
Class AddressSpace Abstract representation of a non-contiguous memory region.
Class FileAddressSpace An address space representing memory mapped files.
Class ProcessAddressSpace An address space representing the memory of a process.
Class DeviceAddressSpace An address space representing a device physical memory.
Class Binary Executable file information.
Class Process A running process.
Class ProcessSwitch A process switch during an execution.
Class Device A hardware device with port and memory ranges.
Class DeviceAccess A hardware device access. Represents either a read or write access to a port or physical memory.
Class Symbolic Base class for symbolic objects.
Class SymbolicRegister A CPU register symbolic representation.
Class SymbolicPhysicalMemory No class docstring; 3/5 methods documented
Class Symbol A symbol inside a binary.
Class Instruction A basic block instruction.
Class BasicBlock A block of uninterrupted instructions.
Class Memory This object represents the state of memory at a specified trace point.
Class MemoryAccess Represents memory access triggered by either the CPU or a device (mmio).
Class Cpu Represents the state of the CPU at some Point in the Trace.
Class Point A point in a trace.
Class RegisterAccessPointIterator Iterator on points accessing given register (read or write) from a Point.
Class MemoryAccessPointIterator Iterator on points accessing some given memory (read or write) from a Point.
Class Sequence Wrapper for reven_api.sequence_in_run.
Class Trace A trace is the list of all executed sequences. The Trace concept wraps the Run concepts used in axion and the low-level API.
Class Save A saved project.
Class ExecutionProgress Execution progress.
Class InspectorMemoryHistory This inspector tracks the history of all memory accesses. Activating it is highly recommended.
Class InspectorExecutionsAfterWrite This inspector tracks executions of the memory addresses that have been written to, to detect *execute-after-write* like in self-modifying code. It requires inspector memory_range_history.
Class InspectorAlterExecution This inspector alters the program's execution.
Class InspectorStopExecution This inspector stops the execution at a certain configured point.
Class InspectorStringHistory This inspector will collect information about string that have been manipulated during the execution.
Class Project A reven project. This is the root api object.
API Documentation for reven, generated by pydoctor at 2017-07-13 16:50:42.