Allow comments with #
in expr wordlists
Co-authored-by: AlteredCoder <AlteredCoder>
This commit is contained in:
parent
a62bac0ca0
commit
d0ac43b00f
|
@ -68,6 +68,9 @@ func FileInit(fileFolder string, filename string, fileType string) error {
|
||||||
}
|
}
|
||||||
scanner := bufio.NewScanner(file)
|
scanner := bufio.NewScanner(file)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
|
if strings.HasPrefix(scanner.Text(), "#") { // allow comments
|
||||||
|
continue
|
||||||
|
}
|
||||||
switch fileType {
|
switch fileType {
|
||||||
case "regex", "regexp":
|
case "regex", "regexp":
|
||||||
dataFileRegex[filename] = append(dataFileRegex[filename], regexp.MustCompile(scanner.Text()))
|
dataFileRegex[filename] = append(dataFileRegex[filename], regexp.MustCompile(scanner.Text()))
|
||||||
|
|
Loading…
Reference in a new issue