mirror of
https://github.com/projectdiscovery/subfinder
synced 2026-06-21 14:05:24 +00:00
omnisint from Sonar Labs is dead, is not working anymore (#701)
Co-authored-by: Víctor Zamanillo <victor.zamanillo@cifraeducacion.com>
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
Subfinder leverages multiple open APIs, it is developed for individuals to help them for research or internal work. If you wish to incorporate this tool into a commercial offering or purposes, you must agree to the Terms of the leveraged services:
|
||||
|
||||
- Project Sonar / Bufferover: https://opendata.rapid7.com/about / [https://tls.bufferover.run](https://tls.bufferover.run/dns?q)
|
||||
- Bufferover: https://tls.bufferover.run
|
||||
- CommonCrawl: https://commoncrawl.org/terms-of-use/full
|
||||
- certspotter: https://sslmate.com/terms
|
||||
- dnsdumpster: https://hackertarget.com/terms
|
||||
|
||||
@@ -38,7 +38,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/threatminer"
|
||||
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/virustotal"
|
||||
@@ -76,7 +75,6 @@ var AllSources = [...]subscraping.Source{
|
||||
&securitytrails.Source{},
|
||||
&shodan.Source{},
|
||||
&sitedossier.Source{},
|
||||
&sonarsearch.Source{},
|
||||
&threatbook.Source{},
|
||||
&threatminer.Source{},
|
||||
&virustotal.Source{},
|
||||
|
||||
@@ -39,7 +39,6 @@ var (
|
||||
"securitytrails",
|
||||
"shodan",
|
||||
"sitedossier",
|
||||
"sonarsearch",
|
||||
"threatbook",
|
||||
"threatminer",
|
||||
"virustotal",
|
||||
@@ -91,7 +90,6 @@ var (
|
||||
"hackertarget",
|
||||
"passivetotal",
|
||||
"securitytrails",
|
||||
"sonarsearch",
|
||||
"virustotal",
|
||||
"reconcloud",
|
||||
}
|
||||
@@ -119,7 +117,6 @@ func TestSourceCategorization(t *testing.T) {
|
||||
func TestSourceFiltering(t *testing.T) {
|
||||
someSources := []string{
|
||||
"alienvault",
|
||||
"sonarsearch",
|
||||
"chaos",
|
||||
"virustotal",
|
||||
}
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
// Package sonarsearch logic
|
||||
package sonarsearch
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping"
|
||||
)
|
||||
|
||||
// Source is the passive scraping agent
|
||||
type Source struct{}
|
||||
|
||||
// Run function returns all subdomains found with the service
|
||||
func (s *Source) Run(ctx context.Context, domain string, session *subscraping.Session) <-chan subscraping.Result {
|
||||
results := make(chan subscraping.Result)
|
||||
go func() {
|
||||
defer close(results)
|
||||
|
||||
getURL := fmt.Sprintf("https://sonar.omnisint.io/subdomains/%s?page=", domain)
|
||||
page := 0
|
||||
var subdomains []string
|
||||
for {
|
||||
resp, err := session.SimpleGet(ctx, getURL+strconv.Itoa(page))
|
||||
if err != nil {
|
||||
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}
|
||||
session.DiscardHTTPResponse(resp)
|
||||
return
|
||||
}
|
||||
|
||||
if err := json.NewDecoder(resp.Body).Decode(&subdomains); err != nil {
|
||||
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}
|
||||
resp.Body.Close()
|
||||
return
|
||||
}
|
||||
resp.Body.Close()
|
||||
|
||||
if len(subdomains) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
for _, subdomain := range subdomains {
|
||||
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Subdomain, Value: subdomain}
|
||||
}
|
||||
|
||||
page++
|
||||
}
|
||||
}()
|
||||
|
||||
return results
|
||||
}
|
||||
|
||||
// Name returns the name of the source
|
||||
func (s *Source) Name() string {
|
||||
return "sonarsearch"
|
||||
}
|
||||
|
||||
func (s *Source) IsDefault() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *Source) HasRecursiveSupport() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (s *Source) NeedsKey() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *Source) AddApiKeys(_ []string) {
|
||||
// no key needed
|
||||
}
|
||||
Reference in New Issue
Block a user