diff --git a/back/search/search.go b/back/search/search.go index 7677096..31605cb 100644 --- a/back/search/search.go +++ b/back/search/search.go @@ -16,6 +16,10 @@ 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 + + // Services + Datawells bool // Whether to include datawells in the search + GithubRecon bool // Whether to include github-recon in the search } type Result struct { @@ -38,8 +42,14 @@ func Search(s *server.Server, q Query, r *Result, mu *sync.RWMutex) { mu.Unlock() wg.Add(2) - go func() { + if !q.Datawells { + mu.Lock() + r.LeakResult = dataleak.LeakResult{Error: "not enabled"} + mu.Unlock() + wg.Done() + return + } leakResult := dataleak.Search(s, q.Text, q.Column, q.ExactMatch) mu.Lock() r.LeakResult = leakResult @@ -48,6 +58,13 @@ func Search(s *server.Server, q Query, r *Result, mu *sync.RWMutex) { }() go func() { + if !q.GithubRecon { + mu.Lock() + r.GithubResult = osint.GithubResult{Error: "not enabled"} + mu.Unlock() + wg.Done() + return + } githubResult := osint.Search(s, q.Text, q.Column) mu.Lock() r.GithubResult = *githubResult diff --git a/front/src/lib/components/index/search/searchbar.svelte b/front/src/lib/components/index/search/searchbar.svelte index a07f05f..e6ad673 100644 --- a/front/src/lib/components/index/search/searchbar.svelte +++ b/front/src/lib/components/index/search/searchbar.svelte @@ -1,19 +1,22 @@
-
- {#each filters as filter} - +
+ {#each filters as filter} + + {/each} +
+ +
@@ -118,116 +120,120 @@
-
- -
-
- - Data wells lookup -
- {#if result.LeakResult.Error !== ""} - - {:else if result.LeakResult.Duration === 0} - - {:else if result.LeakResult.Rows.length > 0} - - {:else} - - {/if} -
-
- {#if result.LeakResult.Error !== ""} -