Skip to main content

zond_engine/core/
config.rs

1// Copyright (c) 2026 Erik Lening (hollowpointer) and Contributors
2//
3// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4// If a copy of the MPL was not distributed with this file, You can obtain one at
5// https://mozilla.org/MPL/2.0/.
6
7/// Global configuration options for the scanner execution.
8///
9/// This struct controls the runtime behavior of the application, including
10/// UI verbosity, network protocol constraints, and privacy features.
11/// It is typically constructed via CLI arguments or a configuration file.
12#[derive(Debug, Clone, Default)]
13pub struct ZondConfig {
14    /// Toggles the display of the startup ASCII banner.
15    ///
16    /// If `true`, the application starts immediately with log output/spinners
17    /// without printing the stylized branding. Useful for clean logs or
18    /// frequent executions.
19    pub no_banner: bool,
20
21    /// Restricts the scanner from generating outbound DNS traffic.
22    ///
23    /// # Behavior
24    /// * **True**: The scanner will strictly avoid sending DNS queries (A, AAAA, PTR).
25    /// * **False** (Default): The scanner may resolve hostnames to IPs or perform reverse lookups.
26    ///
27    /// **Note:** This does not prevent the underlying OS or network stack from
28    /// processing incoming DNS packets if they were initiated elsewhere.
29    pub no_dns: bool,
30
31    /// Enables privacy mode for sensitive data in the output.
32    ///
33    /// When enabled, personally identifiable information (PII) or sensitive
34    /// network details are masked.
35    ///
36    /// # Masked Fields
37    /// * IPv6 Suffixes (e.g Global Unicast)
38    /// * MAC Addresses
39    /// * Hostnames
40    ///
41    /// Use this when sharing screenshots or logs publicly.
42    pub redact: bool,
43
44    /// Controls the visual density and formatting of the terminal output.
45    ///
46    /// This value is typically mapped from the `-q` or `--quiet` CLI flags.
47    ///
48    /// # Levels
49    /// * **0** (Default): Full UI, including colors, spinners, and detailed tables.
50    /// * **1**: Reduced styling. Minimal colors, simplified tables.
51    /// * **2**: Raw mode. Output is strictly data (e.g., plain IP lists), suitable for piping into other tools.
52    pub quiet: u8,
53
54    /// Disables interactive keyboard listeners.
55    ///
56    /// When `true`, the application will not spawn threads to listen for
57    /// runtime commands (like pausing, resuming, or status checks).
58    ///
59    /// # Use Cases
60    /// * Running in a CI/CD pipeline.
61    /// * Running as a background system service (daemon).
62    /// * Non-interactive testing environments.
63    pub disable_input: bool,
64}