mirror of
https://github.com/projectdiscovery/subfinder
synced 2026-06-21 14:05:24 +00:00
Removed entrust source
Due to this https://github.com/projectdiscovery/subfinder/pull/274#issuecomment-661283604. Looks like it is not working due to maintenance but it does not work from months ago
This commit is contained in:
@@ -6,7 +6,6 @@ Subfinder leverages multiple open APIs, it is developed for individuals to help
|
||||
- CommonCrawl: https://commoncrawl.org/terms-of-use/full
|
||||
- certspotter: https://sslmate.com/terms
|
||||
- dnsdumpster: https://hackertarget.com/terms
|
||||
- entrust: https://www.entrustdatacard.com/pages/terms-of-use
|
||||
- Google Transparency: https://policies.google.com/terms
|
||||
- Threatcrowd: https://www.alienvault.com/terms/website-terms-of-use07may2018
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import (
|
||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/crtsh"
|
||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/dnsdb"
|
||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/dnsdumpster"
|
||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/entrust"
|
||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/github"
|
||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/hackertarget"
|
||||
"github.com/projectdiscovery/subfinder/pkg/subscraping/sources/intelx"
|
||||
@@ -91,7 +90,6 @@ var DefaultAllSources = []string{
|
||||
"crtsh",
|
||||
"dnsdumpster",
|
||||
"dnsdb",
|
||||
"entrust",
|
||||
"github",
|
||||
"hackertarget",
|
||||
"ipv4info",
|
||||
@@ -159,8 +157,6 @@ func (a *Agent) addSources(sources []string) {
|
||||
a.sources[source] = &dnsdumpster.Source{}
|
||||
case "dnsdb":
|
||||
a.sources[source] = &dnsdb.Source{}
|
||||
case "entrust":
|
||||
a.sources[source] = &entrust.Source{}
|
||||
case "github":
|
||||
a.sources[source] = &github.Source{}
|
||||
case "hackertarget":
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
package entrust
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"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://ctsearch.entrust.com/api/v1/certificates?fields=issuerCN,subjectO,issuerDN,issuerO,subjectDN,signAlg,san,publicKeyType,publicKeySize,validFrom,validTo,sn,ev,logEntries.logName,subjectCNReversed,cert&domain=%s&includeExpired=true&exactMatch=false&limit=5000", domain))
|
||||
if err != nil {
|
||||
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}
|
||||
session.DiscardHTTPResponse(resp)
|
||||
return
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}
|
||||
resp.Body.Close()
|
||||
return
|
||||
}
|
||||
resp.Body.Close()
|
||||
|
||||
src := string(body)
|
||||
for _, subdomain := range session.Extractor.FindAllString(src, -1) {
|
||||
subdomain = strings.TrimPrefix(subdomain, "u003d")
|
||||
|
||||
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Subdomain, Value: subdomain}
|
||||
}
|
||||
}()
|
||||
|
||||
return results
|
||||
}
|
||||
|
||||
// Name returns the name of the source
|
||||
func (s *Source) Name() string {
|
||||
return "entrust"
|
||||
}
|
||||
Reference in New Issue
Block a user