Skip to main content

Crate adler_core

Crate adler_core 

Source
Expand description

Core engine for the Adler OSINT username-search tool — runtime-agnostic, embed-friendly.

The CLI lives in adler-cli; this crate is what you reach for to drive username detection from your own Rust code (a Discord bot that checks usernames, a security tool that flags exposed identities across a watchlist, a CI gate that asserts a name isn’t claimed elsewhere, …).

§Quick start

Scan the embedded ~439-site registry for one username and print the hits:

use adler_core::{Client, ExecutorOptions, MatchKind, Registry, Username, executor};

let registry = Registry::default_embedded()?;

// filter(include, exclude, tags, exclude_tags, include_nsfw)
// — empty slices = no name/tag filter; `false` keeps the
// default NSFW auto-exclusion (matches Sherlock's `--nsfw`
// opt-in). Pass `true` (or `&["nsfw".into()]` as tags) to
// scan adult-content sites.
let sites = registry.filter(&[], &[], &[], &[], false);

let username = Username::new("torvalds")?;
let client = Client::builder().build()?;

let outcomes =
    executor::run(&client, &sites, &username, ExecutorOptions::default()).await;

for outcome in outcomes.iter().filter(|o| o.kind == MatchKind::Found) {
    println!("{} → {}", outcome.site, outcome.url);
}

§Map of the public API

Detection plumbing:

Optional analysis:

Bot-protected sites (Instagram, X/Twitter today):

§Cache

Cache persists per-(site, username, signal-signature) verdicts between runs. Compose with Client via the builder or skip entirely for one-shot scans.

§Error model

Result is a Result<T, Error> alias; Error is a single crate-level thiserror enum. The probe path never surfaces errors — transient network failures become MatchKind::Uncertain with a typed UncertainReason, so you get a partial result for every site even when the network is flaky. Loader errors (malformed registry JSON, invalid CSS selectors, regex compile failures) come back as Err.

§Version history

Pre-1.0 SemVer. Breaking changes since 0.1:

Each change has a migration block in the CHANGELOG.

Re-exports§

pub use browser::BrowserBackend;
pub use browser::BrowserBudget;
pub use browser::RenderedPage;
pub use doctor::DoctorReport;
pub use doctor::FixSuggestion;
pub use executor::ExecutorOptions;

Modules§

browser
Browser backend for pages that are unusable from raw HTTP.
doctor
Site signature health check.
executor
Concurrent fan-out runner for site probes.

Structs§

Cache
In-memory cache backed by a JSON file.
CheckOutcome
Result of probing a single site for a username.
Client
HTTP client used to probe sites.
ClientBuilder
Builder for Client.
Cluster
A group of accounts that likely belong to the same person.
CorrelationReport
Result of correlating a scan’s outcomes.
Engine
Shared detection signature template for a family of sites that run the same forum / blog / wiki software (Discourse, vBulletin, XenForo, MediaWiki, …). Referenced from Site::engine.
Extractor
A rule for extracting one profile field from a page.
RawResponse
Raw response data returned by Client::fetch for diagnostics.
Registry
A loaded, validated collection of site definitions.
Site
One site we can probe for the existence of an account.
UrlTemplate
URL template containing a {username} placeholder.
Username
A validated username.

Enums§

Error
Errors produced by the Adler engine.
KnownPresent
Known-present declaration on a Site.
MatchKind
Outcome of a single site probe.
PermuteLevel
How aggressively to expand a username into variants.
Signal
A single piece of evidence about whether an account exists.
UncertainReason
Why a probe was inconclusive.

Constants§

DEFAULT_BROWSER_BUDGET
Default ceiling on browser-backed probes per scan when no other value is specified.
LINK_THRESHOLD
Minimum pairwise score to link two accounts.
MAX_VARIANTS
Hard cap on the number of variants returned (including the original).

Functions§

correlate
Correlate Found accounts by their enrichment fields.
permute
Expand username into a deduplicated list of variants per level.

Type Aliases§

Result
Result alias used throughout the engine.