Skip to content

fix: reset result counter per username scan (#2990) - #3084

Open
Dev9269 wants to merge 1 commit into
sherlock-project:masterfrom
Dev9269:fix/per-username-result-count
Open

Dev9269 wants to merge 1 commit into
sherlock-project:masterfrom
Dev9269:fix/per-username-result-count

Conversation

@Dev9269

@Dev9269 Dev9269 commented Aug 20, 2026

Copy link
Copy Markdown

Closes #2990

Problem: notify.py used a module-level globvar = 0 to count claimed results. The single QueryNotifyPrint instance persists across all username scans, and the global was never reset, so the "Search completed with X results" line showed a cumulative total when scanning multiple usernames.

Fix:

  • Replaced the module global with an instance attribute self._count, initialized in __init__.
  • Reset self._count = 0 in start() (called once per username scan in sherlock()).
  • countResults() now increments self._count instead of the global.
  • finish() reads self._count directly instead of doing the fragile countResults() - 1 increment-then-compensate dance.

Behavior is unchanged for single-username scans and correct per-username for multi-username scans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: result counter accumulates across usernames due to module-level global

1 participant