epi052/feroxbuster · error

err.to_string()

Error message

err.to_string()

What it means

During startup wrapped_main runs a connectivity heuristic test (HeuristicTests::connectivity) against all configured targets. If that test returns an Err (e.g. every probe request errored out), the error's string form is re-raised here and the scan is aborted before it begins.

Solutions

  1. Confirm the target URL is correct and reachable (curl it) before running feroxbuster
  2. Check DNS/VPN connectivity to the host
  3. If using --proxy, verify the proxy is up and the scheme/port are correct
  4. Inspect the logged err (log::warn/debug) for the underlying reqwest cause
  5. Use --insecure if a self-signed certificate blocks the connectivity probe

Example fix

// before
feroxbuster -u https://intranet.local -p http://127.0.0.1:9999
// after
curl -k https://intranet.local   # confirm reachable
feroxbuster -u https://intranet.local -p http://127.0.0.1:8080 --insecure
Defensive patterns

Strategy: validation

Validate before calling

curl -sS -o /dev/null -w '%{http_code}' --max-time 5 https://target || echo 'target unreachable'

Prevention

When it happens

Trigger: Calling connectivity(&targets) fails - typically because none of the target hosts resolve or accept connections, or the configured proxy is unusable, causing an underlying reqwest error surfaced via err.to_string().

Common situations: Typo'd or unreachable target URL, DNS failure, target behind a firewall/VPN, invalid proxy settings (--proxy), or TLS problems on the very first connection.

Related errors


AI-assisted analysis of epi052/feroxbuster@1f595dab5c (2026-09-13). Data as JSON: /api/errors/a6ffceffa812e338. Report an issue: GitHub.

Appendix: source

Thrown at src/main.rs:572

        // The TermOutHandler spawns a FileOutHandler, so errors in the FileOutHandler never bubble
        // up due to the TermOutHandler never awaiting the result of FileOutHandler::start (that's
        // done later here in main). sync checks that the tx/rx connection to the file handler works
        if send_to_file && handles.output.sync(send_to_file).await.is_err() {
            // output file specified and file handler could not initialize
            clean_up(handles, tasks).await?;
            let msg = format!("Couldn't start {} file handler", config.output);
            bail!(fmt_err(&msg));
        }
    }

    // discard non-responsive targets
    let live_targets = {
        let test = heuristics::HeuristicTests::new(handles.clone());
        let result = test.connectivity(&targets).await;
        if let Err(err) = result {
            clean_up(handles, tasks).await?;
            bail!(fmt_err(&err.to_string()));
        }
        result?
    };

    if live_targets.is_empty() {
        clean_up(handles, tasks).await?;
        bail!(fmt_err("Could not find any live targets to scan"));
    }

    // kick off a scan against any targets determined to be responsive
    match scan(live_targets, handles.clone()).await {
        Ok(_) => {}
        Err(e) => {
            clean_up(handles, tasks).await?;
            bail!(fmt_err(&format!("Failed while scanning: {e}")));
        }
    }

View on GitHub (pinned to 1f595dab5c)