FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Have I Been Pwned Has a Free API — Check If Any Email Was in a Data Breach
NewsMachine Learning

Have I Been Pwned Has a Free API — Check If Any Email Was in a Data Breach

via Dev.to TutorialAlex Spinov3h ago

Why This Matters Data breaches happen daily. Have I Been Pwned (HIBP) tracks 14+ billion compromised accounts across 800+ breaches. Their API lets you check programmatically — no manual lookups. Check a Password (Without Sending It) HIBP uses a k-anonymity model. You send only the first 5 characters of the SHA-1 hash. The API returns all matching hashes. Your password never leaves your machine. import hashlib import requests def check_password ( password ): sha1 = hashlib . sha1 ( password . encode ()). hexdigest (). upper () prefix , suffix = sha1 [: 5 ], sha1 [ 5 :] r = requests . get ( f " https://api.pwnedpasswords.com/range/ { prefix } " ) for line in r . text . splitlines (): hash_suffix , count = line . split ( " : " ) if hash_suffix == suffix : return int ( count ) return 0 count = check_password ( " password123 " ) if count : print ( f " Found in { count : , } breaches! Change it immediately. " ) else : print ( " Not found in any known breach. " ) Output: Found in 126,927 brea

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles

News

FiberBills: A Complete Billing & Collection System for ISPs and Subscription Businesses

Medium Programming • 3h ago

News

Prompting as Probabilistic Programming

Medium Programming • 4h ago

La historia de Ramiro..
News

La historia de Ramiro..

Dev.to • 4h ago

The Sonos Ace are a hefty 25 percent for Amazon’s Big Spring Sale
News

The Sonos Ace are a hefty 25 percent for Amazon’s Big Spring Sale

The Verge • 4h ago

Hooks in Claude Code
News

Hooks in Claude Code

Medium Programming • 4h ago

Discover More Articles