pub struct Config {Show 17 fields
pub verbose: u8,
pub lemmeknow_config: Identifier,
pub lemmeknow_min_rarity: f32,
pub lemmeknow_max_rarity: f32,
pub lemmeknow_tags: Vec<String>,
pub lemmeknow_exclude_tags: Vec<String>,
pub lemmeknow_boundaryless: bool,
pub human_checker_on: bool,
pub timeout: u32,
pub top_results: bool,
pub api_mode: bool,
pub regex: Option<String>,
pub wordlist_path: Option<String>,
pub wordlist: Option<HashSet<String>>,
pub colourscheme: HashMap<String, String>,
pub enhanced_detection: bool,
pub model_path: Option<String>,
}Expand description
Library input is the default API input The CLI turns its arguments into a LibraryInput struct The Config object is a default configuration object For the entire program It’s access using a variable like configuration
use ares::config::get_config;
let config = get_config();
assert_eq!(config.verbose, 0);Fields§
§verbose: u8A level of verbosity to determine. How much we print in logs.
lemmeknow_config: IdentifierThe lemmeknow config to use
lemmeknow_min_rarity: f32lemmeknow_config serialization fields
lemmeknow_max_rarity: f32Maximum rarity threshold for lemmeknow detection
List of lemmeknow tags to include in detection
List of lemmeknow tags to exclude from detection
lemmeknow_boundaryless: boolWhether to use boundaryless mode in lemmeknow detection
human_checker_on: boolShould the human checker be on? This asks yes/no for plaintext. Turn off for API
timeout: u32The timeout threshold before Ares quits This is in seconds
top_results: boolWhether to collect all plaintexts until timeout expires instead of exiting after finding the first valid plaintext
api_mode: boolIs the program being run in API mode? This is used to determine if we should print to stdout Or return the values
regex: Option<String>Regex enables the user to search for a specific regex or crib
wordlist_path: Option<String>Path to the wordlist file. Will be overridden by CLI argument if provided.
wordlist: Option<HashSet<String>>Wordlist data structure (loaded from file). CLI takes precedence if both config and CLI specify a wordlist.
colourscheme: HashMap<String, String>Colourscheme hashmap
enhanced_detection: boolEnables enhanced plaintext detection using a BERT model.
model_path: Option<String>Path to the enhanced detection model. If None, will use the default path.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more