Skip to main content

ScanCommand

Struct ScanCommand 

Source
pub struct ScanCommand {
Show 23 fields pub file: PathBuf, pub db_path: PathBuf, pub timeout_seconds: u64, pub max_concurrency: usize, pub rate_limit_rps: u32, pub no_whois: bool, pub geoip: Option<String>, pub scan_external_scripts: bool, pub fail_on: FailOn, pub verbosity: Verbosity<InfoLevel>, pub log_level: LogLevel, pub log_format: LogFormat, pub log_file: PathBuf, pub no_progress: bool, pub fail_on_pct_threshold: u8, pub config: Option<PathBuf>, pub user_agent: String, pub fingerprints: Option<String>, pub allow_degraded_fingerprints: bool, pub status_port: Option<u16>, pub cache_dir: Option<PathBuf>, pub drain_timeout_secs: u64, pub enable_whois: bool,
}
Expand description

Scan command arguments.

Everyday flags are on -h. All flags (except the legacy --enable-whois alias) are on --help.

Fields§

§file: PathBuf

URL list (one URL per line). Use - for stdin.

§db_path: PathBuf§timeout_seconds: u64§max_concurrency: usize§rate_limit_rps: u32

URL admission rate (tokens per input URL per second). 0 disables both the global cap and the 2/sec per-host cap.

Not per-HTTP-request RPS: redirects, favicon, TLS, and WHOIS share one token per input URL. When enabled, each host is also limited to 2 URL tokens/sec.

§no_whois: bool

Disable WHOIS/RDAP (on by default).

Overrides TOML/env enable_whois = true.

§geoip: Option<String>

GeoIP MMDB path or URL. Or set MAXMIND_LICENSE_KEY for GeoLite2 download.

§scan_external_scripts: bool

Fetch first-party external script bodies (secrets + static tech). Off by default.

Only scripts on the same registrable domain as the page are fetched (known third-party CDNs are skipped). Fetches are capped at 10 scripts per page, size/timeout limited, and SSRF-validated like the primary URL. Off by default because it expands the threat surface and adds per-URL latency.

§fail_on: FailOn

CI exit policy when some URLs fail (never, any-failure, pct>).

§verbosity: Verbosity<InfoLevel>§log_level: LogLevel

Baseline log level; overridden by -v / -q (preferred for quick changes).

§log_format: LogFormat

Format for scan --log-file and for export/summary stderr.

plain in the scan file is uncolored; export/summary stderr plain uses colors.

§log_file: PathBuf§no_progress: bool

Hide the terminal progress bar (still logs progress to --log-file).

§fail_on_pct_threshold: u8§config: Option<PathBuf>§user_agent: String§fingerprints: Option<String>§allow_degraded_fingerprints: bool

Start the scan even if the full Enthec + HTTPArchive catalog cannot be loaded. Default is to abort so technology detection is not silently thin.

§status_port: Option<u16>§cache_dir: Option<PathBuf>

Shared cache root for fingerprints, GeoIP, WHOIS, and User-Agent data. Defaults to $DOMAIN_STATUS_CACHE_DIR or the platform cache dir + domain_status/ (Linux ~/.cache/…, macOS ~/Library/Caches/…). Database and log paths are separate.

§drain_timeout_secs: u64

Maximum time (seconds) to wait for in-flight tasks to finish after the input queue is exhausted. Tasks still running after this window are aborted and recorded in url_failures with the timeout reason. Raise this for WHOIS-heavy small batches if scans report drain timeouts.

§enable_whois: bool

Enable WHOIS/RDAP (on by default). Prefer --no-whois to disable. Kept for backward compatibility with scripts that pass --enable-whois.

Trait Implementations§

Source§

impl Args for ScanCommand

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Clone for ScanCommand

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CommandFactory for ScanCommand

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for ScanCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for ScanCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for ScanCommand

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.