Skip to content

Commit

Permalink
fixed 2 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4f53 committed Aug 6, 2024
1 parent 03b20eb commit 6859773
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions textsubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func getSubdomains(text string) ([]string, error) {
broken := BreakFusedSubdomains(subdomain)
brokenList := strings.Split(broken, "\n")
for _, element := range brokenList {
if element != "" && !stringInSlice(element, subdomains) {
if element != "" && !stringInSlice(element, subdomains) && element[0] != '.' {
finalList = append(finalList, element)
}
}
Expand Down Expand Up @@ -245,7 +245,9 @@ func SubdomainAndDomainPair(text string, removeDuplicates bool) ([]SubAndDom, er
pair.Subdomain = item
pair.Domain = domain

results = append(results, pair)
if domain != item {
results = append(results, pair)
}

if removeDuplicates {
results = removeDuplicateSubAndDoms(results)
Expand Down

0 comments on commit 6859773

Please sign in to comment.