Skip to content

Commit

Permalink
Handle missing params
Browse files Browse the repository at this point in the history
  • Loading branch information
nhalstead committed May 19, 2021
1 parent 8e37e2b commit 72c1ed1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sprint/cmd/fingerprintCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions sprint/cmd/matchCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 72c1ed1

Please sign in to comment.