Skip to content

Wordlist loader: one line over 64 KB fails the whole run; full list held in memory 2-3x #56

Closed

Description

@TMHSDigital

Why it matters

Merged or dirty wordlists, or a binary file passed by mistake, should degrade gracefully instead of aborting the run. Very large lists cost 2-3x their size in RAM, and that cost repeats for each -dL target.

Evidence

  • internal/wordlist/reader.go:68 uses bufio.Scanner with the default 64 KB token limit.
    • Repro: a 70,000-character line followed by www gives Error: reading wordlist file: bufio.Scanner: token too long, exit 1.
  • The whole file is read into []string and then copied into entries.

Suggested approach

  • scanner.Buffer(make([]byte, 64<<10), 1<<20), or use bufio.Reader.ReadString. Skip overlong lines and count them as invalid, like other rejected entries.
  • Load the wordlist once and share it across -dL targets. Longer term, stream entries (pairs with the dispatcher issue).

Done when

An overlong line is skipped with a count in the summary, and memory for N targets doesn't scale with N.

Activity

  1. added
    bug
    priority: low
    area: cli
    performance
    on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clibugperformancepriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions