Skip to content

Instantly share code, notes, and snippets.

@picatz
Last active August 29, 2018 22:21
Show Gist options
  • Save picatz/45e4d8b35a314abd244453d9cc712b65 to your computer and use it in GitHub Desktop.
Save picatz/45e4d8b35a314abd244453d9cc712b65 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "shodanz"
# create a shodanz client
client = Shodanz.client.new
# scan a host
result = client.rest_api.scan("8.8.8.8")
# save the scan result as json to a file
File.open('result.json', 'w') { |f| f.write(result.to_json) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment