Going to start this side to work on querying APIs with rust so I can use it for my alphabet soup project later.
Lots of chatgpt. Much fun.
Takes a static input from the main function, sha1 hashes it, asks HIBP if the first 5 of the sha1 are in its API and reports the number of hits in the API
Using the "pwned passwords" functions
Using this project to learn more about Rust programming, http request and security.
Create directory where ever you want as long as rust is installed.
inside of the directory you want the project to be created:
cargo new project_name_here
This will get Cargo to make a project and do some house keeping like make a gitignore so you don't inadvertently try to post executables and so forth to github.
Copy the contents of the main.rs file to your main and edit the cargo.toml.
Alternatively run:
cargo add reqwest
cargo add sha1
cargo add tokio
cargo add hex
I prefer this.
Line 7
let input_string: &str = "password";
Currently static with no real reason to take in input as its mostly a proof of concept for me. Change as necessary.
Should return the URL for the page.
Sha1 hash and the clear text
How many times if any it has made it to the Have I been Pwned DB.