diff --git a/sprint/cmd/fingerprintCmd.go b/sprint/cmd/fingerprintCmd.go index 64ec05c..72a51ea 100644 --- a/sprint/cmd/fingerprintCmd.go +++ b/sprint/cmd/fingerprintCmd.go @@ -21,6 +21,11 @@ var ( Use: "host [fqdn or ip]", Short: "Get ssl fingerprint of a URL", Run: func(cmd *cobra.Command, args []string) { + if len(args) == 0 { + cmd.Help() + os.Exit(1) + } + host := args[0] // Default to show SHA 1 if no modes are selected diff --git a/sprint/cmd/matchCmd.go b/sprint/cmd/matchCmd.go index 7f9ac72..1381a0b 100644 --- a/sprint/cmd/matchCmd.go +++ b/sprint/cmd/matchCmd.go @@ -14,6 +14,11 @@ var ( Use: "match [fqdn or ip] [fingerprint]", Short: "Get ssl fingerprint of a URL and check if it matches the given fqdn or ip", Run: func(cmd *cobra.Command, args []string) { + if len(args) == 0 { + cmd.Help() + os.Exit(1) + } + domainURL := args[0] fingerprint := args[1]