Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions v2/pkg/passive/sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/crtsh"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/dnsdb"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/dnsdumpster"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/dnsrepo"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/fofa"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/fullhunt"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/github"
Expand All @@ -36,7 +37,6 @@ import (
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/securitytrails"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/shodan"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/sitedossier"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/sonarsearch"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/threatbook"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/threatcrowd"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/threatminer"
Expand All @@ -45,8 +45,6 @@ import (
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/whoisxmlapi"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/zoomeye"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/zoomeyeapi"
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/dnsrepo"

)

var AllSources = [...]subscraping.Source{
Expand Down Expand Up @@ -78,7 +76,6 @@ var AllSources = [...]subscraping.Source{
&securitytrails.Source{},
&shodan.Source{},
&sitedossier.Source{},
&sonarsearch.Source{},
&threatbook.Source{},
&threatcrowd.Source{},
&threatminer.Source{},
Expand Down
10 changes: 4 additions & 6 deletions v2/pkg/passive/sources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ var (
"securitytrails",
"shodan",
"sitedossier",
"sonarsearch",
"threatbook",
"threatcrowd",
"threatminer",
Expand Down Expand Up @@ -90,7 +89,6 @@ var (
"hackertarget",
"passivetotal",
"securitytrails",
"sonarsearch",
"virustotal",
}
)
Expand All @@ -114,11 +112,11 @@ func TestSourceCategorization(t *testing.T) {
assert.ElementsMatch(t, expectedAllSources, maps.Keys(NameSourceMap))
}

func Test(t *testing.T) {
func TestSourceFiltering(t *testing.T) {
someSources := []string{
"alienvault",
"sonarsearch",
"chaos",
"dnsdumpster",
"virustotal",
}

Expand All @@ -137,7 +135,7 @@ func Test(t *testing.T) {
{someSources, someExclusions, false, false, len(someSources) - len(someExclusions)},
{someSources, someExclusions, false, true, 1},
{someSources, someExclusions, true, false, len(AllSources) - len(someExclusions)},
{someSources, someExclusions, true, true, 9},
{someSources, someExclusions, true, true, 8},

{someSources, []string{}, false, false, len(someSources)},
{someSources, []string{}, true, false, len(AllSources)},
Expand All @@ -148,7 +146,7 @@ func Test(t *testing.T) {
{[]string{}, []string{}, true, true, len(expectedDefaultRecursiveSources)},
}
for index, test := range tests {
t.Run(strconv.Itoa(index), func(t *testing.T) {
t.Run(strconv.Itoa(index+1), func(t *testing.T) {
agent := New(test.sources, test.exclusions, test.withAllSources, test.withRecursion)

for _, v := range agent.sources {
Expand Down
74 changes: 0 additions & 74 deletions v2/pkg/subscraping/sources/sonarsearch/sonarsearch.go

This file was deleted.