diff --git a/README.md b/README.md index cb3ab67..4662330 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ So finally after working hard, here is something that I hope you guys will :hear - Simple and modular code base making it easy to contribute. - Fast And Powerful Bruteforcing Module (In Development) - Powerful Permutation generation engine. (In Development) -- Many Passive Data Sources (CertDB, CertSpotter, crtsh, DNSDumpster, FindSubdomains, Hackertarget, Netcraft, PassiveTotal, PTRArchive, SecurityTrails, Threatcrowd, VirusTotal, Waybackarchive, Threatminer, DnsDB) +- Many Passive Data Sources (CertDB, CertSpotter, crtsh, DNSDumpster, FindSubdomains, Hackertarget, Netcraft, PassiveTotal, PTRArchive, SecurityTrails, Threatcrowd, VirusTotal, Waybackarchive, Threatminer) - Multiple Output formats ## Install @@ -111,7 +111,6 @@ This tool is currently in active development. So some features may not work or m ## Acknowledgements - @FranticFerret for his work on adding docker support. -- @himanshudas for adding DnsDB Support to the tool. ## License diff --git a/libsubfinder/engines/passive/passive.go b/libsubfinder/engines/passive/passive.go index 224f8f9..e40447b 100644 --- a/libsubfinder/engines/passive/passive.go +++ b/libsubfinder/engines/passive/passive.go @@ -20,7 +20,6 @@ import ( "github.com/ice3man543/subfinder/libsubfinder/sources/certdb" "github.com/ice3man543/subfinder/libsubfinder/sources/certspotter" "github.com/ice3man543/subfinder/libsubfinder/sources/crtsh" - //"github.com/ice3man543/subfinder/libsubfinder/sources/dnsdb" "github.com/ice3man543/subfinder/libsubfinder/sources/dnsdumpster" "github.com/ice3man543/subfinder/libsubfinder/sources/findsubdomains" "github.com/ice3man543/subfinder/libsubfinder/sources/hackertarget" @@ -51,7 +50,6 @@ type Source struct { Netcraft bool Waybackarchive bool Threatminer bool - //Dnsdb bool NoOfSources int } @@ -77,7 +75,6 @@ func PassiveDiscovery(state *helper.State) (finalPassiveSubdomains []string) { fmt.Printf("\n[-] Searching For Subdomains in Securitytrails") fmt.Printf("\n[-] Searching For Subdomains in WaybackArchive") fmt.Printf("\n[-] Searching For Subdomains in ThreatMiner") - //fmt.Printf("\n[-] Searching For Subdomains in Dnsdb") fmt.Printf("\n[-] Searching For Subdomains in Netcraft\n") } @@ -171,13 +168,7 @@ func PassiveDiscovery(state *helper.State) (finalPassiveSubdomains []string) { } sourceConfig.Threatminer = true sourceConfig.NoOfSources = sourceConfig.NoOfSources + 1 - } /*else if source == "dnsdb" { - if state.Silent != true { - fmt.Printf("\n[-] Searching For Subdomains in DnsDB") - } - sourceConfig.Dnsdb = true - sourceConfig.NoOfSources = sourceConfig.NoOfSources + 1 - }*/ + } } } @@ -228,9 +219,6 @@ func PassiveDiscovery(state *helper.State) (finalPassiveSubdomains []string) { if sourceConfig.Threatminer == true { go threatminer.Query(state, ch) } - /*if sourceConfig.Dnsdb == true { - go dnsdb.Query(state, ch) - }*/ // Recieve data from all goroutines running for i := 0; i < sourceConfig.NoOfSources; i++ { diff --git a/libsubfinder/sources/dnsdb/dnsdb.go b/libsubfinder/sources/dnsdb/dnsdb.go deleted file mode 100644 index ea81dee..0000000 --- a/libsubfinder/sources/dnsdb/dnsdb.go +++ /dev/null @@ -1,68 +0,0 @@ -// -// Written By : @mehimansu (Himanshu Das) -// -// Distributed Under MIT License -// Copyrights (C) 2018 Ice3man -// - -// A DnsDB Subdomain parser in golang -package dnsdb - -import ( - "fmt" - "io/ioutil" - "regexp" - "strings" - - "github.com/ice3man543/subfinder/libsubfinder/helper" -) - -// all subdomains found -var subdomains []string - -// Query function returns all subdomains found using the service. -func Query(state *helper.State, ch chan helper.Result) { - - var result helper.Result - result.Subdomains = subdomains - - // Make a http request to DnsDB - resp, err := helper.GetHTTPResponse("http://www.dnsdb.org/f/"+state.Domain+".dnsdb.org/", state.Timeout) - if err != nil { - result.Error = err - ch <- result - return - } - - // Get the response body - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - result.Error = err - ch <- result - return - } - - src := string(body) - - re := regexp.MustCompile("(?<=href=\").+?(?=\")|(?<=href=\').+?(?=\')") - match := re.FindAllStringSubmatch(src, -1) - - for _, subdomain := range match { - // Dirty Logic - finishedSub := strings.Split(subdomain[1], "//")[1] - - if state.Verbose == true { - if state.Color == true { - fmt.Printf("\n[%sDNSDB%s] %s", helper.Red, helper.Reset, finishedSub) - } else { - fmt.Printf("\n[DNSDB] %s", finishedSub) - } - } - - subdomains = append(subdomains, finishedSub) - } - - result.Subdomains = subdomains - result.Error = nil - ch <- result -}