Documentation ¶
Overview ¶
Package directoryscanner provides simple directory scanning functionality for sensitive data
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CompiledRegexes = map[string][]*regexp.Regexp{ "Credit Card": {regexp.MustCompile("^(?:4[0-9]{12}(?:[0-9]{3})?|[25][1-7][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$")}, "SSN": {regexp.MustCompile("(^\\d{3}-?\\d{2}-?\\d{4}$|^XXX-XX-XXXX$)")}, "Word Password": {regexp.MustCompile("password")}, "Word Username": {regexp.MustCompile("username")}, "Email": {regexp.MustCompile("^[\\w\\.=-]+@[\\w\\.-]+\\.[\\w]{2,3}$")}, }
CompiledRegexes ... Accessible outside the module so users can add (or remove) whatever they want
Functions ¶
func Find ¶
Find ... begins at the specified path (path) and recursively searches all directories acceptable arguments for variatic function: "Credit Card", "SSN", "Word Password", "Word Username", "Email"
func FindString ¶ added in v1.1.1
FindString ... Finds in the directory "path" all files and locations within those files containing any of the strings contained within the variadic parameter "strings"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.