Skip to content

--stats should report at the end #145

Description

I figured --stats would spit out something like rg --stats but if you're scanning a large corpous with lots of hits, stats will get buried. imo --stats should be printing at the end of a scan.
rg:

~/code/betterleaks/betterleaks (v2) rg '(?i)(access|auth|api|credential|creds|key|secret|token)[ \t\w.-]{0,20}[\s\x27\x22]{0,3}(=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60\x27\x22\s=]{0,5}([\w.=-]{10,150}|[a-z0-9][a-z0-9+/]{11,}={0,3})(\\?[\x27\x22\x60]|[\s;]|\\[nr]|$)' README.md --stats
125:    const token = "ghp_aB3dE5fG7hI9jK1mN3pQ5rS7tU9vW1xY3zA5" // betterleaks:allow

1 matches
1 matched lines
1 files contained matches
1 files searched
83 bytes printed
9685 bytes searched
0.001031 seconds spent searching
0.045459 seconds total

tgrep:

~/code/betterleaks/betterleaks (v2) tgrep '(?i)(access|auth|api|credential|creds|key|secret|token)[ \t\w.-]{0,20}[\s\x27\x22]{0,3}(=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60\x27\x22\s=]{0,5}([\w.=-]{10,150}|[a-z0-9][a-z0-9+/]{11,}={0,3})(\\?[\x27\x22\x60]|[\s;]|\\[nr]|$)' README.md --stats
Brute-force search completed in 40.6ms (1 files) <--- 
125:    const token = "ghp_aB3dE5fG7hI9jK1mN3pQ5rS7tU9vW1xY3zA5" // betterleaks:allow

Also it would be great to see some more stats like rg supplies.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions