Updated Validation With String Comparison
parent
594672bd2a
commit
83ff73e55b
|
@ -12,6 +12,7 @@ import (
|
|||
"io/ioutil"
|
||||
"crypto/rand"
|
||||
"io"
|
||||
"strings"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
@ -92,7 +93,7 @@ func Unique(strSlice []string) []string {
|
|||
//
|
||||
func Validate(state *State, strslice []string) (subdomains []string) {
|
||||
for _, entry := range strslice {
|
||||
if state.Regex.MatchString(entry) == true {
|
||||
if strings.Contains(entry, state.Domain) {
|
||||
subdomains = append(subdomains, entry)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,8 +25,7 @@ type State struct {
|
|||
Bruteforce bool // Flag to decide whether to bruteforce or not
|
||||
WildcardIPs []string // Wildcard IP Structure
|
||||
IsWildcard bool // Does the host has wildcard subdomains, if yes parse them carefully
|
||||
Regex *regexp.Regexp // Regex object for parsing current subdomains
|
||||
|
||||
|
||||
ConfigState Config // Current configuration file state
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue