dissect.target.tools.dump.run

Module Contents

Classes

Functions

get_targets

Return a generator with Target objects for provided paths

execute_function

Execute function function on provided target target and return a generator

produce_target_func_pairs

Return a generator with target and function pairs for execution.

execute_functions

Execute a function on a target for target / function pairs in the stream.

log_progress

Log a number of items that went though the generator stream

sink_records

Persist records from the stream into appropriate sinks, per serialization, compression and record type.

persist_processing_state

Keep track of the pipeline state in a persistent state object.

execute_pipeline

Run the record generation, processing and sinking pipeline.

parse_arguments

main

Attributes

log

dissect.target.tools.dump.run.log
class dissect.target.tools.dump.run.RecordStreamElement
target: dissect.target.Target
func: str
record: flow.record.Record
end_pos: int | None
sink_path: pathlib.Path | None
dissect.target.tools.dump.run.get_targets(targets: list[str]) Iterator[dissect.target.Target]

Return a generator with Target objects for provided paths

dissect.target.tools.dump.run.execute_function(target: dissect.target.Target, function: dissect.target.tools.utils.PluginFunction) dissect.target.helpers.record.TargetRecordDescriptor

Execute function function on provided target target and return a generator with the records produced.

Only output type record is supported for plugin functions.

dissect.target.tools.dump.run.produce_target_func_pairs(targets: Iterable[dissect.target.Target], functions: str, state: dissect.target.tools.dump.state.DumpState) Iterator[tuple[dissect.target.Target, dissect.target.tools.utils.PluginFunction]]

Return a generator with target and function pairs for execution.

Target and function pairs that correspond to finished sinks in provided state state are skipped.

dissect.target.tools.dump.run.execute_functions(target_func_stream: Iterable[tuple[dissect.target.Target, str]]) Iterable[RecordStreamElement]

Execute a function on a target for target / function pairs in the stream.

Returns a generator of RecordStreamElement objects.

dissect.target.tools.dump.run.log_progress(stream: Iterable[Any], step_size: int = 1000) Iterable[Any]

Log a number of items that went though the generator stream after every N element (N is configured in step_size).

dissect.target.tools.dump.run.sink_records(record_stream: Iterable[RecordStreamElement], state: dissect.target.tools.dump.state.DumpState) Iterator[RecordStreamElement]

Persist records from the stream into appropriate sinks, per serialization, compression and record type.

dissect.target.tools.dump.run.persist_processing_state(record_stream: Iterable[RecordStreamElement], state: dissect.target.tools.dump.state.DumpState) Iterator[RecordStreamElement]

Keep track of the pipeline state in a persistent state object.

dissect.target.tools.dump.run.execute_pipeline(targets: list[str], functions: str, output_dir: pathlib.Path, serialization: dissect.target.tools.dump.utils.Serialization, compression: dissect.target.tools.dump.utils.Compression | None = None, restart: bool | None = False, limit: int | None = None) None

Run the record generation, processing and sinking pipeline.

dissect.target.tools.dump.run.parse_arguments() argparse.Namespace
dissect.target.tools.dump.run.main()