commit
61e8dd258b
|
@ -23,6 +23,7 @@ import (
|
||||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/passivetotal"
|
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/passivetotal"
|
||||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/rapiddns"
|
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/rapiddns"
|
||||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/recon"
|
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/recon"
|
||||||
|
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/riddler"
|
||||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/robtex"
|
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/robtex"
|
||||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/securitytrails"
|
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/securitytrails"
|
||||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/shodan"
|
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/shodan"
|
||||||
|
@ -78,6 +79,7 @@ var DefaultRecursiveSources = []string{
|
||||||
"hackertarget",
|
"hackertarget",
|
||||||
"ipv4info",
|
"ipv4info",
|
||||||
"passivetotal",
|
"passivetotal",
|
||||||
|
"riddler",
|
||||||
"securitytrails",
|
"securitytrails",
|
||||||
"sublist3r",
|
"sublist3r",
|
||||||
"virustotal",
|
"virustotal",
|
||||||
|
@ -105,6 +107,7 @@ var DefaultAllSources = []string{
|
||||||
"intelx",
|
"intelx",
|
||||||
"passivetotal",
|
"passivetotal",
|
||||||
"rapiddns",
|
"rapiddns",
|
||||||
|
"riddler",
|
||||||
"recon",
|
"recon",
|
||||||
"robtex",
|
"robtex",
|
||||||
"securitytrails",
|
"securitytrails",
|
||||||
|
@ -185,6 +188,8 @@ func (a *Agent) addSources(sources []string) {
|
||||||
a.sources[source] = &rapiddns.Source{}
|
a.sources[source] = &rapiddns.Source{}
|
||||||
case "recon":
|
case "recon":
|
||||||
a.sources[source] = &recon.Source{}
|
a.sources[source] = &recon.Source{}
|
||||||
|
case "riddler":
|
||||||
|
a.sources[source] = &riddler.Source{}
|
||||||
case "robtex":
|
case "robtex":
|
||||||
a.sources[source] = &robtex.Source{}
|
a.sources[source] = &robtex.Source{}
|
||||||
case "securitytrails":
|
case "securitytrails":
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
package riddler
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bufio"
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/projectdiscovery/subfinder/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)
|
||||||
|
|
||||||
|
resp, err := session.SimpleGet(ctx, fmt.Sprintf("https://riddler.io/search?q=pld:%s&view_type=data_table", domain))
|
||||||
|
if err != nil {
|
||||||
|
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}
|
||||||
|
session.DiscardHTTPResponse(resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
scanner := bufio.NewScanner(resp.Body)
|
||||||
|
for scanner.Scan() {
|
||||||
|
line := scanner.Text()
|
||||||
|
if line == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
subdomain := session.Extractor.FindString(line)
|
||||||
|
if subdomain != "" {
|
||||||
|
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Subdomain, Value: subdomain}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resp.Body.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
|
return results
|
||||||
|
}
|
||||||
|
|
||||||
|
// Name returns the name of the source
|
||||||
|
func (s *Source) Name() string {
|
||||||
|
return "riddler"
|
||||||
|
}
|
Loading…
Reference in New Issue