aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 99443a2..ffe811e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -96,6 +96,10 @@ fn check(pw: Password) -> Result<(), Box<::std::error::Error>> {
let hashes = std::str::from_utf8(&body)?;
if let Some(pos) = hashes.find(&pw.rest) {
println!("Password is PWNED!");
+ if let Some(res) = hashes[pos..].lines().take(1).collect::<Vec<_>>().pop() {
+ let count = res.split(':').skip(1).collect::<Vec<_>>().pop().unwrap();
+ println!("The password {} was found in {} breaches", pw.pw, count);
+ }
}
Ok(())
})