rekall.helpers module¶
This module defines a collection of helper functions and constants.
-
rekall.helpers.
INFTY
¶ A String representing Infinity for float comparisons in predicates.
-
rekall.helpers.
bottom_half
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering the bottom half of
bbox
.
-
rekall.helpers.
bottom_left
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering the bottom left quadrant of
bbox
.
-
rekall.helpers.
bottom_right
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering the bottom right quadrant of
bbox
.
-
rekall.helpers.
center
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering a quarter of
bbox
, starting in the middle.
-
rekall.helpers.
full_frame
()¶ Returns a bounding box representing the full frame.
-
rekall.helpers.
left_half
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering the left half of
bbox
.
-
rekall.helpers.
make_bbox
(x1, y1, x2, y2)¶ A helper function to make a 2D bounding box.
Parameters: - x1 – The x1 value of the bounding box.
- y1 – The y1 value of the bounding box.
- x2 – The x2 value of the bounding box.
- y2 – The y2 value of the bounding box.
Returns: A dict with keys ‘x1’, ‘y1’, ‘x2’, ‘y2’ representing a bounding box.
-
rekall.helpers.
panic
(message)¶ Print an error message and exit.
-
rekall.helpers.
perf_count
(name, enable=True)¶ Prints wall time for the code block to STDOUT
Example
- with perf_count(“test code”):
- sleep(10)
# Writes to stdout: # test code starts. # test code ends after 10.01 seconds
-
rekall.helpers.
right_half
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering the right half of
bbox
.
-
rekall.helpers.
top_half
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering the top half of
bbox
.
-
rekall.helpers.
top_left
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering the top left quadrant of
bbox
.
-
rekall.helpers.
top_right
(bbox={'x1': 0.0, 'x2': 1.0, 'y1': 0.0, 'y2': 1.0})¶ Returns a bounding box covering the top right quadrant of
bbox
.