Releases: picatz/shodanz
Releases · picatz/shodanz
v2.0.8
v2.0.7
An asynchronous future!
Version 2.0.0
brings asynchronous I/O support by utilizing async!
Async Example
The following example script streams banners from shodan, and checks the IP addresses found against the experimental honeypot detector:
require 'async'
require 'shodanz'
client = Shodanz.client.new
client.streaming_api.banners do |banner|
if ip = banner['ip_str']
Async do
score = client.rest_api.honeypot_score(ip).wait
puts "#{ip} has a #{score * 100}% chance of being a honeypot"
rescue Shodanz::Errors::RateLimited
sleep rand
retry
rescue # any other errors
next
end
end
end