lib/mihari/analyzers/shodan.rb in mihari-1.5.0 vs lib/mihari/analyzers/shodan.rb in mihari-1.5.1
- old
+ new
@@ -54,9 +54,13 @@
res = search_with_page(query, page: page)
break unless res
responses << res
break if res["total"].to_i <= page * PAGE_SIZE
+ rescue JSON::ParserError
+ # ignore JSON::ParserError
+ # ref. https://github.com/ninoseki/mihari/issues/197
+ next
end
responses
end
end
end