Skip to content

Commit

Permalink
change serde import loc
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Oct 2, 2023
1 parent 02db1ce commit 2809296
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rookie-rs/src/chromium.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{path::PathBuf, error::Error};

use serde_json;

#[cfg(target_os = "windows")]
use aes_gcm::{Aes256Gcm, Key,aead::{Aead, KeyInit, generic_array::GenericArray}};
Expand Down Expand Up @@ -163,9 +163,10 @@ fn query_cookies(v10_key: Vec<u8>, db_path: PathBuf, domains: Option<Vec<&str>>)




#[cfg(target_os = "windows")]
pub fn chromium_based(key: PathBuf, db_path: PathBuf, domains: Option<Vec<&str>>) -> Result<Vec<Cookie>, Box<dyn Error>> {
use serde_json;

let content = std::fs::read_to_string(&key)?;
let key_dict: serde_json::Value = serde_json::from_str(content.as_str()).or(Err("Cant read json file"))?;

Expand Down

0 comments on commit 2809296

Please sign in to comment.