String-based secret-searching tool, high entropy and regexes.
This code is entirely based on truffleHog. The main difference is that whereas truffleHog was built with git repositories in mind, this tool is an attempt of applying truffleHog approach (potential secret searching leveraging both regular expressions and entropy calculation) against any data (although for it to be effective, data should not be encoded nor compressed).
The tool simply iterates over all files from the given path, runs regex and entropy checks against each string. Then reports caught strings per file. Two modes of secret search are supported:
- regex: checks each of the strings against a set of regular expressions.
- entropy: reports strings with high entropy