diff --git a/cmd/ipdex/file/file.go b/cmd/ipdex/file/file.go index fc90741..1b31ff1 100644 --- a/cmd/ipdex/file/file.go +++ b/cmd/ipdex/file/file.go @@ -73,6 +73,12 @@ func FileCommand(file string, forceRefresh bool, yes bool) { } } nbIPToProcess = len(ipsToProcess) + if nbIPToProcess == 0 { + if outputFormat == display.HumanFormat { + style.Info("No valid IP addresses found in the file.") + } + return + } } else { for _, ip := range report.IPs {