Skip to content

Commit

Permalink
update: all command to use DumpWildCard feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
Esonhugh committed Mar 21, 2024
1 parent 7b2cb33 commit bd5d590
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ var AllCmd = &cobra.Command{
records, err := scanner.DumpAXFR(dns.Fqdn(command.Opts.Zone), "ns.dns."+command.Opts.Zone+":53")
if err == nil {
printResult(records)
return
}
log.Errorf("Transfer failed: %v", err)
records = scanner.DumpWildCard(command.Opts.Zone)
if records != nil && len(records) > 0 {
printResult(records)
return
}
log.Errorf("WildCard dns dump failed: %v", err)

ipNets, err := pkg.ParseStringToIPNet(command.Opts.Cidr)
if err != nil {
log.Warnf("ParseStringToIPNet failed: %v", err)
Expand Down

0 comments on commit bd5d590

Please sign in to comment.