Skip to content

Releases: picatz/shodanz

v2.0.8

02 Dec 00:31
4df2b5c
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.7...v2.0.8

v2.0.7

05 Nov 20:51
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.6...v2.0.7

An asynchronous future!

01 May 18:23
Compare
Choose a tag to compare

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