Skip to content

Commit

Permalink
🔨 fix fofa-spider panic due to nil pointer in response
Browse files Browse the repository at this point in the history
  • Loading branch information
wjlin0 committed Feb 6, 2024
1 parent 64a5260 commit eac4e37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sources/agent/fofa-spider/fofa.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func (agent *Agent) queryStatsList(STATS string, session *sources.Session, query
}
request.Header.Set("Referer", "https://fofa.info/")
resp, err := session.Do(request, Source)
if err != nil {
return nil, err
}
if err := json.NewDecoder(resp.Body).Decode(fofaResponse); err != nil {
return nil, err
}
Expand Down

0 comments on commit eac4e37

Please sign in to comment.