polytracker.inputs
A module for modeling taint sources like input files
inputs classes
Input
- class polytracker.inputs.Input(uid: int, path: str, size: int, track_start: int = 0, track_end: int | None = None, content: bytes | None = None)
Bases:
object
A source of taint
- __init__(uid: int, path: str, size: int, track_start: int = 0, track_end: int | None = None, content: bytes | None = None)
Initializes a taint source.
- Parameters:
uid – A unique ID for the input (unique per trace).
path – The path to the input when the trace was run.
size – The number of bytes read from the input.
track_start – The byte offset of the source where tracing started.
track_end – The byte offset of the source where tracing ended. (Defaults to the end of the input.)
content – The original bytes of the input.
- property content: bytes
The original bytes of the input, if available.
- Raises:
ValueError – If the input did not have its content stored to the database (e.g., if the instrumented binary was run with
POLYSAVEINPUT=0
) andself.path
does not exist.