diff options
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 48b8e4c..7fe7e93 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ extern crate reqwest; extern crate ring; -use std::{env, thread, time}; +use std::{env, thread, time, process}; use std::error::Error; use ring::digest; @@ -132,6 +132,7 @@ fn main() { } let mut first_round = true; + let mut pwn_count = 0; for pw in passwords { if first_round { @@ -146,6 +147,7 @@ fn main() { Ok(num) => { if num > 0 { println!("Password is PWNED! It was found in {} breaches.", num); + pwn_count += 1; } else { println!("Password was not found in any breaches"); @@ -153,4 +155,6 @@ fn main() { } } } + + process::exit(pwn_count); } |