Skip to content

Commit

Permalink
fix JSON decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Autumn-27 committed Dec 6, 2024
1 parent 25ab134 commit ade74bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/urlscan/wayback/source/alienvault.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ade74bd

Please sign in to comment.