From 7200e83d47aa113bf98b49ab883e70130ae2ab69 Mon Sep 17 00:00:00 2001 From: Ice3man Date: Mon, 16 Jan 2023 19:06:04 +0530 Subject: [PATCH] Fixed panic with non-existent target and no cloud flag typo --- v2/internal/runner/runner.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/v2/internal/runner/runner.go b/v2/internal/runner/runner.go index 4cb43e80..e0513757 100644 --- a/v2/internal/runner/runner.go +++ b/v2/internal/runner/runner.go @@ -188,6 +188,9 @@ func New(options *types.Options) (*Runner, error) { hmapInput, err := hybrid.New(&hybrid.Options{ Options: options, NotFoundCallback: func(target string) bool { + if !options.Cloud { + return false + } parsed, parseErr := strconv.ParseInt(target, 10, 64) if parseErr != nil { if err := runner.cloudClient.ExistsDataSourceItem(nucleicloud.ExistsDataSourceItemRequest{Contents: target, Type: "targets"}); err == nil {