From ade74bddc251564bba12f41ffe620205431740ef Mon Sep 17 00:00:00 2001 From: "Autumn.home" Date: Sat, 7 Dec 2024 00:10:42 +0800 Subject: [PATCH] fix JSON decoder --- modules/urlscan/wayback/source/alienvault.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/urlscan/wayback/source/alienvault.go b/modules/urlscan/wayback/source/alienvault.go index b4960fcf..ce4af0aa 100644 --- a/modules/urlscan/wayback/source/alienvault.go +++ b/modules/urlscan/wayback/source/alienvault.go @@ -30,8 +30,9 @@ func AlienvaultRun(rootUrl string, result chan Result, ctx context.Context) int } var response AlienvaultResponse + responseData := append([]byte(nil), bodyBytes...) // Get the response body and decode - if err := json.Unmarshal(bodyBytes, &response); err != nil { + if err := json.Unmarshal(responseData, &response); err != nil { logger.SlogWarnLocal(fmt.Sprintf("Alienvault jsondecode error: %v", err)) return lineCount }