PwnedCheck updated to also check for Snapchat

PwnedCheck is a ruby gem that I wrote that checks an email address, phone number, or username against the new site by Troy Hunt called His site aggregates data from breaches and allows you to check to see if your data has been compromised. Use it as follows-


gem install PwnedCheck


require 'pwnedcheck'

# The 4 cases.
# is a valid address on the site
# is a valid address, but not on the site
# is an invalid format
# mralexgray is a user id in snapchat
list = ['', '', '', 'mralexgray']

list.each do |item|
    sites = PwnedCheck::check(item)
    if sites.length == 0
      puts "#{item} --> Not found on"
      sites.each do |site|
        puts "#{item} --> #{site}"
  rescue PwnedCheck::InvalidEmail => e
    puts "#{item} --> #{e.message}"

Output: --> Adobe --> Gawker --> Stratfor --> Not found on --> Not found on
mralexgray --> Snapchat

The code is available at and the gem page is

This entry was posted in Open Source, Ruby, Security. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *