Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justjavac/chrome_password.rs
Get username & password from Chrome.
https://github.com/justjavac/chrome_password.rs
Last synced: 2 days ago
JSON representation
Get username & password from Chrome.
- Host: GitHub
- URL: https://github.com/justjavac/chrome_password.rs
- Owner: justjavac
- License: mit
- Created: 2022-08-09T13:22:22.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-18T08:06:29.000Z (about 2 years ago)
- Last Synced: 2024-10-03T12:24:09.031Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 43
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chrome_password
~~Steal~~ Get username & password from Chrome. (**Now Only Windows**)
## Installation
You can download the exe binary from the
[releases page](https://github.com/justjavac/chrome_password.rs/releases).**With Cargo:**
```powershell
cargo install chrome_password
```## Usage
```plain
➜ ~ chrome_password
+----------------------------------------+------------------------+---------------------------+
| url | username | password |
+----------------------------------------+------------------------+---------------------------+
| https://baidu.com | justjavac | 12345678 |
+----------------------------------------+------------------------+---------------------------+
| http://127.0.0.1/login.php | admin | 12345678 |
+----------------------------------------+------------------------+---------------------------+
| https://www.zhihu.com/login | root | 12345678 |
```## Use as crate
Add this to your `Cargo.toml`:
```toml
[dependencies]
chrome_password = "0.2"
```Code:
```rust
use std::env;
use std::path::PathBuf;fn main() {
let user_profile = env::var("LOCALAPPDATA").unwrap();
let local_state_path = PathBuf::from(&user_profile).join("Google/Chrome/User Data/Local State");
let login_data_path = PathBuf::from(&user_profile).join("Google/Chrome/User Data/Default/Login Data");let master_key = chrome_password::get_master_key(&local_state_path);
let password = chrome_password::get_password(&login_data_path, &master_key);println!("{:?}", &password);
}
```## Related projects
- [chrome_password_ui Tauri](https://github.com/justjavac/steal_password_from_browser)
- [chrome_password node.js](https://github.com/justjavac/chrome_password.js)## License
chrome_password is released under the MIT License. See the bundled
[LICENSE](./LICENSE) file for details.