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]) Generator[dissect.target.Target, None, None]#

Return a generator with Target objects for provided paths

dissect.target.tools.dump.run.execute_function(target: dissect.target.Target, function: str) Generator[dissect.target.helpers.record.TargetRecordDescriptor, None, None]#

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: List[str], state: dissect.target.tools.dump.state.DumpState) Generator[Tuple[dissect.target.Target, str], None, None]#

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]]) Generator[RecordStreamElement, None, None]#

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) Generator[Any, None, None]#

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) Generator[RecordStreamElement, None, None]#

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) Generator[RecordStreamElement, None, None]#

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

dissect.target.tools.dump.run.execute_pipeline(targets: List[str], functions: List[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()#