Ruby Implementation
Password Request
require 'net/http' require 'json' url = 'https://leakedpassword.com/api/?p={your-password}' uri = URI(url) response = Net::HTTP.get(uri) JSON.parse(response)
SHA1 Hash Request
require 'net/http' require 'json' url = 'https://leakedpassword.com/api/?s={your-sha1-hash}' uri = URI(url) response = Net::HTTP.get(uri) JSON.parse(response)
Response
{ "password": { "leak": true, "hash": "7110eda4d09e062aa5e4a390b0a572ac0d2c0220", "seen": 1256907 } }