diff --git a/internal/scan/options.go b/internal/scan/options.go index 88de4fd..b8da291 100644 --- a/internal/scan/options.go +++ b/internal/scan/options.go @@ -280,12 +280,23 @@ func LoadTextWordlist(fns []string, extensions []string, dirsearchCompatabilityM return nil } + if strings.HasSuffix(filename, ".kite") { + return fmt.Errorf("attempted to load kitefile as plain text wordlist: %s. Please provide a plain wordlist", filename) + } + + if strings.HasSuffix(filename, ".json") { + return fmt.Errorf("attempted to load json as plain text wordlist: %s. Please provide a plain wordlist", filename) + } + lines, err := readLines(filename) if err != nil { return fmt.Errorf("failed to load file %s: %w", filename, err) } for _, v := range lines { + if len(v) == 0 { + continue + } // ensure we prepend the / for a path if v[0] != '/' { v = append([]byte("/"), v...)