Skip to main content

Cli

Struct Cli 

Source
pub struct Cli {
Show 47 fields pub urls: Option<PathBuf>, pub stdin: bool, pub har: Option<PathBuf>, pub no_filter: bool, pub filter_timeout: u64, pub no_discovery: bool, pub output: Option<PathBuf>, pub format: CliFormat, pub stream: bool, pub baseline: Option<PathBuf>, pub quiet: bool, pub summary: bool, pub no_auto_report: bool, pub concurrency: usize, pub max_endpoints: usize, pub delay_ms: u64, pub retries: u32, pub timeout_secs: u64, pub waf_evasion: bool, pub user_agents: Vec<String>, pub headers: Vec<String>, pub cookies: Vec<String>, pub proxy: Option<String>, pub danger_accept_invalid_certs: bool, pub active_checks: bool, pub dry_run: bool, pub per_host_clients: bool, pub adaptive_concurrency: bool, pub auth_bearer: Option<String>, pub auth_basic: Option<String>, pub auth_flow: Option<PathBuf>, pub auth_flow_b: Option<PathBuf>, pub unauth_strip_headers: Option<Vec<String>>, pub session_file: Option<PathBuf>, pub no_cors: bool, pub no_csp: bool, pub no_graphql: bool, pub no_api_security: bool, pub no_jwt: bool, pub no_openapi: bool, pub no_mass_assignment: bool, pub no_oauth_oidc: bool, pub no_rate_limit: bool, pub no_cve_templates: bool, pub no_websocket: bool, pub min_severity: Option<CliSeverity>, pub fail_on: CliSeverity,
}
Expand description

A fast, async web security scanner.

Reads a list of URLs from a file or stdin, runs the enabled checks concurrently, and writes findings in JSON or NDJSON format.

Fields§

§urls: Option<PathBuf>

Path to a newline-delimited file of URLs to scan.

§stdin: bool

Read newline-delimited URLs from stdin instead of a file.

§har: Option<PathBuf>

Path to a HAR file; imports log.entries[].request.url as scan seeds.

§no_filter: bool

Skip pre-filtering of inaccessible URLs (enabled by default).

§filter_timeout: u64

Timeout for accessibility pre-check (seconds).

§no_discovery: bool

Skip endpoint discovery and scan only the provided seed URLs.

§output: Option<PathBuf>

Write findings to this file path (default: stdout).

§format: CliFormat

Output format.

§stream: bool

Emit NDJSON findings as they arrive (NDJSON only).

§baseline: Option<PathBuf>

Baseline NDJSON file; suppress findings already present in baseline.

§quiet: bool

Suppress all stdout output except findings (no summary box).

§summary: bool

Print the summary box even in quiet mode.

§no_auto_report: bool

Disable automatic local report persistence under ~/Documents/ApiHunterReports.

§concurrency: usize

Maximum number of concurrent in-flight requests.

§max_endpoints: usize

Maximum number of endpoints to scan per site (0 = unlimited).

§delay_ms: u64

Per-domain minimum delay between requests (milliseconds).

§retries: u32

Maximum number of retry attempts on transient errors.

§timeout_secs: u64

Per-request timeout (seconds).

§waf_evasion: bool

Enable WAF-evasion heuristics (randomised UA, header shuffling, jitter).

§user_agents: Vec<String>

Rotate through these User-Agent strings (comma-separated). Implies –waf-evasion.

§headers: Vec<String>

Extra request headers applied to every request (e.g. “Authorization: Bearer xxx”).

§cookies: Vec<String>

Cookies applied to every request (e.g. “session=abc123,theme=dark”).

§proxy: Option<String>

HTTP/HTTPS proxy URL (e.g. http://127.0.0.1:8080).

§danger_accept_invalid_certs: bool

Accept invalid / self-signed TLS certificates (dangerous).

§active_checks: bool

Enable active (potentially invasive) checks.

§dry_run: bool

Dry-run active checks: do not send mutation probes, emit informational “would test” findings.

§per_host_clients: bool

Use per-host HTTP client pools.

§adaptive_concurrency: bool

Enable adaptive concurrency (AIMD).

§auth_bearer: Option<String>

Convenience: add Authorization: Bearer <token>.

§auth_basic: Option<String>

Convenience: add Authorization: Basic <base64(user:pass)>.

§auth_flow: Option<PathBuf>

Path to a JSON auth flow descriptor for pre-scan login. See docs/auth-flow.md for the format.

§auth_flow_b: Option<PathBuf>

Second auth flow for cross-user IDOR checks (–active-checks required).

§unauth_strip_headers: Option<Vec<String>>

Extra auth-like headers to strip for unauthenticated probes (comma-separated).

§session_file: Option<PathBuf>

Load/save cookies from a JSON session file.

§no_cors: bool

Disable the CORS scanner.

§no_csp: bool

Disable the CSP scanner.

§no_graphql: bool

Disable the GraphQL scanner.

§no_api_security: bool

Disable the API-security scanner.

§no_jwt: bool

Disable the JWT scanner.

§no_openapi: bool

Disable the OpenAPI scanner.

§no_mass_assignment: bool

Disable the Mass Assignment scanner (active checks).

§no_oauth_oidc: bool

Disable the OAuth/OIDC scanner (active checks).

§no_rate_limit: bool

Disable the Rate Limit scanner (active checks).

§no_cve_templates: bool

Disable the CVE Template scanner (active checks).

§no_websocket: bool

Disable the WebSocket scanner (active checks).

§min_severity: Option<CliSeverity>

Minimum severity to include in findings output.

§fail_on: CliSeverity

Exit with code 1 when findings at or above this severity are found.

Trait Implementations§

Source§

impl Args for Cli

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 CommandFactory for Cli

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 Cli

Source§

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

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

impl FromArgMatches for Cli

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 Cli

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§

§

impl Freeze for Cli

§

impl RefUnwindSafe for Cli

§

impl Send for Cli

§

impl Sync for Cli

§

impl Unpin for Cli

§

impl UnsafeUnpin for Cli

§

impl UnwindSafe for Cli

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more