From 76ee0ec48620fbc871b0a26e6729be279f055129 Mon Sep 17 00:00:00 2001 From: Esonhugh Date: Mon, 15 Apr 2024 17:53:11 +0800 Subject: [PATCH] update: precheck of dump wildcard --- cmd/wildcard/wildcard.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/wildcard/wildcard.go b/cmd/wildcard/wildcard.go index 94d0e73..6941e58 100644 --- a/cmd/wildcard/wildcard.go +++ b/cmd/wildcard/wildcard.go @@ -20,6 +20,11 @@ var WildCardCmd = &cobra.Command{ log.Warn("zone can't empty") return } - printer.PrintResult(scanner.DumpWildCard(command.Opts.Zone), command.Opts.OutputFile) + record := scanner.DumpWildCard(command.Opts.Zone) + if record == nil || len(record) == 0 { + log.Warnf("DumpWildCard Found Nothing") + return + } + printer.PrintResult(record, command.Opts.OutputFile) }, }