Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
fix: make RawTarget conform FQDN
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2E committed Jul 17, 2023
1 parent ff4ec43 commit aa2b7a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ func (c *Config) Verify() error {
dn = dn[dot+1:]
}
c.Target = dn

if _, ok := dns.IsDomainName(c.Target); !ok {
return errors.New("invalid domain name: " + c.Target)
}
c.Target = dns.Fqdn(c.Target)
c.RawTarget = dns.Fqdn(c.RawTarget)

if c.Wordlist != "" {
f, err := os.Open(c.Wordlist)
Expand Down
4 changes: 4 additions & 0 deletions internal/module/wordlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ func RunWordlist(ctx context.Context, toNext chan<- *Task) error {
dSet[word] = struct{}{}

dn := fn(word)
// logrus.Debug(dn)
putTask(toNext, dn)
}

// try main domain too
putTask(toNext, conf.C.Target)
return nil
}

0 comments on commit aa2b7a9

Please sign in to comment.