Function armorlib::coordinator::process
[−]
[src]
pub fn process(
scan_modules_to_run: Vec<Box<ScanModule>>,
extra_preprocessors: Vec<Box<Preprocessor>>,
binary_object: BinaryObject,
filetype: Option<String>
) -> Result<ScanResult, ArmorlibError>
Process the given BinaryObject through the ArmorLib system and return a ScanResult.
All other process() functions are simply wrappers for this function.
Arguments
scan_modules_to_run: a vec of theScanModules to run while processing.extra_preprocessors: a vec of the extra preprocessors (in addition to those that are included in the core library) that are necessary to run the givenscan_mdoules_to_run. Like normal core library preprocessors, a preprocessor will only run if it is required by some scan module.binary_object: theBinaryObjectthat will be scanned by ArmorLib.filetype: anOption<String>of the filetype of the data, with preceding.(e.g..pdf). Because this information may not be known, there is a possibility of absence that is represented by the wrappingOption.
Examples
use armorlib::{scan_modules, binary_object, util}; use armorlib::coordinator; let scan_result = coordinator::process( scan_modules::make_default_scan_modules(), Vec::new(), binary_object::BinaryObject::from( util::hex_to_vec( "48 8B CD E8 60 FF FF FF 48 FF C3 32 44 1E FF 48 FF CF 88 43 FF 48 8B CD E8 60" ).unwrap()), None );