implements #61

Freely inspired by Aquatone
master
mzack 2018-06-20 21:30:54 +02:00
parent e4c89539aa
commit 70214ff211
3 changed files with 12 additions and 9 deletions

View File

@ -84,11 +84,11 @@ type Source struct {
Virustotal bool
Waybackarchive bool
CertificateTransparency bool
Shodan bool
Ipv4Info bool
Yahoo bool
Dogpile bool
Exalead bool
Shodan bool
}
func (s *Source) enableAll() {
@ -115,11 +115,11 @@ func (s *Source) enableAll() {
s.Virustotal = true
s.Waybackarchive = true
s.CertificateTransparency = true
s.Shodan = true
s.Ipv4Info = true
s.Yahoo = true
s.Dogpile = true
s.Exalead = true
s.Shodan = true
}
func (s *Source) enable(dataSources []string) {
@ -171,8 +171,6 @@ func (s *Source) enable(dataSources []string) {
s.Waybackarchive = true
case "certificatetransparency":
s.CertificateTransparency = true
case "shodan":
s.Shodan = true
case "ipv4info":
s.Ipv4Info = true
case "yahoo":
@ -181,6 +179,8 @@ func (s *Source) enable(dataSources []string) {
s.Dogpile = true
case "exalead":
s.Exalead = true
case "shodan":
s.Shodan = true
}
}
}
@ -242,6 +242,8 @@ func (s *Source) disable(dataSources []string) {
s.Dogpile = false
case "exalead":
s.Dogpile = false
case "shodan":
s.Shodan = false
}
}
}

View File

@ -41,10 +41,11 @@ func Query(args ...interface{}) interface{} {
fmt.Printf("\nerror: %v\n", err)
return subdomains
}
src := string(body)
re := regexp.MustCompile(`([a-z0-9]+\.)+` + domain)
match := re.FindAllString(src, -1)
reSub := regexp.MustCompile(`"`)
src := reSub.ReplaceAllLiteralString(string(body), " ")
match := helper.ExtractSubdomains(src, domain)
for _, subdomain := range match {
if state.Verbose == true {

View File

@ -106,6 +106,8 @@ func main() {
reflect.ValueOf(&state.ConfigState).Elem().FieldByName("CensysUsername").SetString(object[1])
} else if strings.EqualFold(object[0], "censyssecret") == true {
reflect.ValueOf(&state.ConfigState).Elem().FieldByName("CensysSecret").SetString(object[1])
} else if strings.EqualFold(object[0], "shodankey") == true {
reflect.ValueOf(&state.ConfigState).Elem().FieldByName("ShodanAPIKey").SetString(object[1])
}
configJson, _ := json.MarshalIndent(state.ConfigState, "", " ")
@ -117,8 +119,6 @@ func main() {
fmt.Printf("Successfully configured %s%s%s=>%s\n", helper.Info, object[0], helper.Reset, object[1])
}
os.Exit(0)
}
if state.SetSetting != "none" {