mirror of
https://github.com/projectdiscovery/subfinder
synced 2026-06-21 14:05:24 +00:00
Remove non-functional "threatcrowd" source #654
* the whole site is down
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ Subfinder leverages multiple open APIs, it is developed for individuals to help
|
||||
- certspotter: https://sslmate.com/terms
|
||||
- dnsdumpster: https://hackertarget.com/terms
|
||||
- Google Transparency: https://policies.google.com/terms
|
||||
- Threatcrowd: https://www.alienvault.com/terms/website-terms-of-use07may2018
|
||||
- Alienvault: https://www.alienvault.com/terms/website-terms-of-use07may2018
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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"
|
||||
@@ -38,15 +39,12 @@ import (
|
||||
"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"
|
||||
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/virustotal"
|
||||
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping/sources/waybackarchive"
|
||||
"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{
|
||||
@@ -80,7 +78,6 @@ var AllSources = [...]subscraping.Source{
|
||||
&sitedossier.Source{},
|
||||
&sonarsearch.Source{},
|
||||
&threatbook.Source{},
|
||||
&threatcrowd.Source{},
|
||||
&threatminer.Source{},
|
||||
&virustotal.Source{},
|
||||
&waybackarchive.Source{},
|
||||
|
||||
@@ -42,7 +42,6 @@ var (
|
||||
"sitedossier",
|
||||
"sonarsearch",
|
||||
"threatbook",
|
||||
"threatcrowd",
|
||||
"threatminer",
|
||||
"virustotal",
|
||||
"waybackarchive",
|
||||
@@ -74,7 +73,6 @@ var (
|
||||
"riddler",
|
||||
"securitytrails",
|
||||
"shodan",
|
||||
"threatcrowd",
|
||||
"threatminer",
|
||||
"virustotal",
|
||||
"whoisxmlapi",
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
// Package threatcrowd logic
|
||||
package threatcrowd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
|
||||
"github.com/projectdiscovery/subfinder/v2/pkg/subscraping"
|
||||
)
|
||||
|
||||
type response struct {
|
||||
Subdomains []string `json:"subdomains"`
|
||||
}
|
||||
|
||||
// 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://www.threatcrowd.org/searchApi/v2/domain/report/?domain=%s", domain))
|
||||
if err != nil {
|
||||
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}
|
||||
session.DiscardHTTPResponse(resp)
|
||||
return
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
var data response
|
||||
err = jsoniter.NewDecoder(resp.Body).Decode(&data)
|
||||
if err != nil {
|
||||
results <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}
|
||||
return
|
||||
}
|
||||
|
||||
for _, subdomain := range data.Subdomains {
|
||||
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 "threatcrowd"
|
||||
}
|
||||
|
||||
func (s *Source) IsDefault() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (s *Source) HasRecursiveSupport() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *Source) NeedsKey() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *Source) AddApiKeys(_ []string) {
|
||||
// no key needed
|
||||
}
|
||||
Reference in New Issue
Block a user