Skip to content
Search files for high entropy strings.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
README searches files for strings with high shannon entropy. Similar to trufflehog but for local files rather than git repos.


git clone

What it does will dig secrets out of a file or a group of files by returning strings with high shannon entropy. This can be used to quickly pull secret keys out of a large collection of files like a local sourcecode repo.

How to

To use on a single file use: -f ./filename

You can also search all the files in the current directory using:

or recursively search all the files in the current directory and all of its subdirectories using: -r

By default only considers strings that are at least 20 characters long. You can adjust this using: -m 33

It also only considers strings that conform either to the hexidecimal or base64 charsets. By default it will return hex strings with a shannon entropy of greater than 3 and base64 strings with a shannon entropy greater than 4.5. These values can be adjusted as follows: -b64entropy 5 -hexentropy 4

By default, output will be in the form - path/to/file : line number : secret
./target/325643454.txt : 451 : 706c100d319514ebd09e2c34286be31d

use -v for more detail -v
Line: 10
Type: Base64
Shannon Entropy: 6.02236781303
Secret: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
Full Line:
        BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123
You can’t perform that action at this time.