Updated Validation With String Comparison

master
ice3man 2018-04-07 16:03:16 +05:30
parent 594672bd2a
commit 83ff73e55b
2 changed files with 3 additions and 3 deletions

View File

@ -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)
}
}

View File

@ -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
}