Skip to content

Instantly share code, notes, and snippets.

@pry0cc
Created July 29, 2019 12:11
Show Gist options
  • Save pry0cc/d248525d607403c633d75f8f499ecf51 to your computer and use it in GitHub Desktop.
Save pry0cc/d248525d607403c633d75f8f499ecf51 to your computer and use it in GitHub Desktop.
A script to lookup data on Breachsense.io
#!/usr/bin/env ruby
require 'mechanize'
require 'json'
### You need to insert a valid key here.
key = ""
@agent = Mechanize.new()
data = @agent.get("https://breachsense.io/api?lic=#{key}&s=#{ARGV[0]}&json").body()
parsed = JSON.parse(data)
puts JSON.pretty_generate(parsed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment