repositories

percival

Follow the trail a handle leaves across the web: username search across 5,700+ sites, in Rust

clonegit clone https://git.daemon-sec.xyz/percival.git

3 folders · 5 files · 2.9 MiB

NameTypeSize
assets/folder1 file
data/folder5 files
src/folder40 files
.gitignoreGit51 B
Cargo.lockLockfile67.5 KiB
Cargo.tomlTOML1.4 KiB
LICENSELicense1.2 KiB
README.mdMarkdown9.7 KiB

README.md

open document
Percival — follow the trail a handle leaves across the web



Rust License Sites Theme CLI

Username and email OSINT in Rust. One binary, three upstream databases, canary-verified hits, profile extraction, pivoting, deleted-account detection, and Rosé Pine from the animated startup banner to every report.

Named after the knight of the Grail quest — Percival follows the trail to the account behind a handle.

#191724 base #c4a7e7 iris #9ccfd8 foam #ebbcba rose #f6c177 gold #eb6f92 love #31748f pine

Why another one#

Sherlock, Maigret, Blackbird and WhatsMyName each have a site database and a checker. Percival eats all of their databases and adds the parts they are missing:

Sherlock Maigret Blackbird Percival
Sites (merged, deduplicated) ~480 ~5,400 (mostly disabled) ~700 5,700+ from all three
Reads other tools' databases – Sherlock – WhatsMyName, Sherlock, Maigret, own
False-positive guard at scan time – – – canary account re-check on every hit
WAF / captcha / rate-limit detection partial yes – yes, strong + weak signals
Profile metadata extraction – yes yes (AI) yes, JSON + HTML + JSON-LD, no API keys
Pivot on discovered handles – yes – yes, --recursive, depth-limited
Deleted-account detection (Wayback) – – – --archive-all
Username permutations {?} --permute --permute --permute / --permute-all
Email search – – yes Gravatar, GitHub, HIBP, derived handles
Filter language – tags --filter boolean expressions with regex
Site self-check + auto-disable – yes – yes, selfcheck --write
Reports txt, csv, xlsx html, pdf, csv, json, xmind csv, pdf, json html, json, ndjson, csv, md, txt, dot
Per-host rate limiting, retries, redirect chains – partial – yes
Language Python Python Python Rust, single static binary

Install#

cargo install --path .        # from this directory
# or
cargo build --release && cp target/release/percival ~/.local/bin/

Requires Rust 1.85+. The three site databases are embedded, so the binary works offline; percival update pulls fresh copies.

Use#

percival johndoe                              # scan ~1,500 ranked sites, show hits
percival johndoe -a                           # show every result
percival johndoe -c social,coding -o          # categories + write html/json/csv reports
percival johndoe --recursive --archive        # pivot on handles found in bios, check Wayback
percival johndoe --all-sites -j 120           # the whole 5,700-site database, faster
percival john.doe --permute --top 300         # johndoe, john_doe, jdoe… on the 300 biggest sites
percival email john.doe@example.com           # gravatar, github, derived handles (+ HIBP with a key)
percival -i handles.txt --json > out.ndjson   # batch, machine-readable
percival johndoe --tor                        # everything via socks5h://127.0.0.1:9050

Result lines:

  ✔ GitHub (User)          https://github.com/torvalds [coding]   265ms
      ↳ Linus Torvalds · 📍 Portland, OR · 323k followers · joined 2011-09-03
  ⚠ Some Forum             https://…    suspicious: canary also matched
  ⛔ Reddit                 forbidden (HTTP 403)

✔ is a verified hit. ⚠ means the site also claimed a random 14-character canary username exists, so its detector is lying; the hit is kept in reports flagged verified: false. ⛔ is a WAF, captcha, login wall or rate limit.

Exit codes: 0 hits, 1 no hits, 2 usage or config error, 3 nothing answered (network down).

Subcommands#

command what it does
percival <user>… / search scan usernames
email <addr>… email lookups plus derived usernames; --hibp-key adds breach data
sites list / --show NAME / --stats / --urls USER / --json the merged database
selfcheck run every detector against its known account and a canary; --write disables broken sites
update download the latest WhatsMyName, Sherlock and Maigret data; --status, --clear
permute <name> print permutations
parse <url>… pull the handle out of profile URLs; --fetch extracts profile data from the page
completions <shell> bash / zsh / fish / … completions
config show paths and current theme; --init writes a commented config.toml

Selecting sites#

-c social,gaming          categories        --tag ru,engine:discourse   Maigret tags
-s github,mastodon        name/host match   -x reddit                   exclude
--source wmn,sherlock     databases         --top 200                   most popular N
--no-nsfw                 --all-sites       --include-disabled          --db extra.json
--thorough                try other databases' probes even on "not found" (more requests)
-F 'cat=coding and rank<=500 and not protection~cloudflare'

Filter fields: name cat tag source url host nsfw rank protection method disabled type detector known. Operators: = != ~ !~ ^= $= =~ > < >= <=, joined with and, or, not, parentheses.

Reports#

-o [DIR] writes <target>.html|json|csv (change with --formats html,json,ndjson,csv,md,txt,dot or all). The HTML report is a single file: summary tiles, a radial graph of target → sites → discovered handles, per-target tables with live filter chips, sortable columns, expandable profile details, and a Rosé Pine / Moon / Dawn switcher.

Everything is Rosé Pine#

Every surface is painted in Rosé Pine:

  • Animated startup banner — a Rosé Pine light sweeps across the PERCIVAL wordmark as the scan begins. It only runs on a colour TTY; piping, NO_COLOR, -q, --json, --no-anim or PERCIVAL_NO_ANIM=1 fall back to a static banner or none.
  • Live results — foam for verified hits, gold for suspicious, love for blocked, iris links, gold categories, an iris/overlay progress bar.
  • HTML report — ships the complete Main, Moon and Dawn palettes with an in-page switcher and follows the viewer's OS light/dark setting.
  • Graphviz DOT graph and the SVG banner above are painted in the palette too.

The terminal picks truecolor or 256-colour automatically and, with no theme set, follows the Omarchy current-theme link (--theme rose-pine|rose-pine-moon|rose-pine-dawn|none to override). CSV, JSON, NDJSON, TXT and Markdown are data-interchange formats and carry no colour by design.

Configuration#

percival config --init writes ~/.config/percival/config.toml. Every flag has a config equivalent (timeout, concurrency, proxy, headers, formats, theme, hibp_api_key, …). Flags win over the file. Updated databases and the self-check overlay live in ~/.local/share/percival/.

Theme: --theme rose-pine|rose-pine-moon|rose-pine-dawn|none, PERCIVAL_THEME, or the config key. With nothing set, Percival reads the Omarchy current-theme link and follows it. Truecolor is used when the terminal advertises it, 256-colour otherwise, nothing when piped or NO_COLOR is set.

How detection works#

Each database keeps its own semantics so upstream data behaves as its authors intended:

  • WhatsMyName — exact status + substring for both the "exists" and "missing" branch. Percival follows redirects but evaluates the status rule against the first and final hop, so m_code: 302 sites work without breaking sites that redirect real profiles.
  • Sherlock / Maigret message — any absence string means missing; presence strings (Maigret) must all appear.
  • status_code / response_url — redirects are followed and the landing page is judged: a URL that still names the account is a hit, a bounce to the root, login, signup or 404 page is a miss, anything else is a medium-confidence hit that the canary check then validates. This is what turns GoodReads, LinkedIn and Couchsurfing profiles (which 301 to a canonical URL) from misses into hits.

When several databases describe the same site, the highest-quality definition is the primary probe and the others become alternates. Alternates are tried automatically when the primary is blocked, errors, or cannot decide; --thorough also consults them on "not found".

Before the detector runs, the response is checked for Cloudflare, Turnstile, AWS WAF, PerimeterX, DataDome, Incapsula, DDoS-Guard, Akamai and Sucuri markers, HTTP 429, and per-site error markers from Maigret. If the detector cannot decide, weaker signals (reCAPTCHA, hCaptcha, login walls, 401/403) explain the result instead of silently counting it as "not found".

Every found is then re-run with a random canary username. A site that also "finds" the canary is marked suspicious.

Data licences#

Site definitions come from WhatsMyName (CC BY-SA 4.0), Sherlock (MIT) and Maigret (MIT). Percival's code is MIT. Use it only against accounts you are authorised to investigate.