Allow to search on specific folders

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-01-06 16:06:27 +01:00
parent 881cdfa9cb
commit 717e4136cd
7 changed files with 90 additions and 17 deletions

View File

@@ -14,9 +14,11 @@ import (
)
type Query struct {
Text string
Column string // The column to search in (e.g., "email", "password", etc.
ExactMatch bool // Whether to search for an exact match
Text string
Column string // The column to search in (e.g., "email", "password", etc.
ExactMatch bool // Whether to search for an exact match
Folders []string
IncludeFolders []bool
// Services
Datawells bool // Whether to include datawells in the search
@@ -53,7 +55,7 @@ func Search(s *server.Server, q Query, r *Result, mu *sync.RWMutex) {
wg.Done()
return
}
leakResult := dataleak.Search(s, q.Text, q.Column, q.ExactMatch)
leakResult := dataleak.Search(s, q.Text, q.Column, q.ExactMatch, q.IncludeFolders)
mu.Lock()
r.LeakResult = leakResult
r.ResultsCount += len(leakResult.Rows)