Skip to content

Commit

Permalink
fix(shodan): incorrect subdomains concatenate (#1392)
Browse files Browse the repository at this point in the history
* fix: shodan source filter subdomains properly

* Update v2/pkg/subscraping/sources/shodan/shodan.go

Co-authored-by: Dwi Siswanto <dwi.siswanto98@gmail.com>

* Revert "Update v2/pkg/subscraping/sources/shodan/shodan.go"

This reverts commit 556df02.

* feat(shodan): rm `strings.HasSuffix` filter

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
Co-authored-by: Gby56 <gab.marquet@gmail.com>
Co-authored-by: Gabriel Marquet <Gby56@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 1, 2024
1 parent e2de15b commit efa1a6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion v2/pkg/subscraping/sources/shodan/shodan.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ func (s *Source) Run(ctx context.Context, domain string, session *subscraping.Se
}

for _, data := range response.Subdomains {
value := fmt.Sprintf("%s.%s", data, response.Domain)
results <- subscraping.Result{
Source: s.Name(), Type: subscraping.Subdomain, Value: fmt.Sprintf("%s.%s", data, domain),
Source: s.Name(), Type: subscraping.Subdomain, Value: value,
}
s.results++
}
Expand Down

0 comments on commit efa1a6e

Please sign in to comment.