(chore): update dependencies and fix code to match them

This commit is contained in:
Eduard Tolosa 2025-07-27 12:12:35 -05:00
parent 99db1a4b29
commit 291f8dfe9e
4 changed files with 359 additions and 408 deletions

748
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -12,17 +12,17 @@ readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
tokio = { version = "1.44.2", features = ["full", "io-util"] } tokio = { version = "1.47.0", features = ["full", "io-util"] }
futures = "0.3.31" futures = "0.3.31"
clap = { version = "4.5.37", features = ["derive"] } clap = { version = "4.5.41", features = ["derive"] }
reqwest = { version = "0.12.15", features = [ reqwest = { version = "0.12.22", features = [
"hickory-dns", "hickory-dns",
"rustls-tls", "rustls-tls",
"native-tls", "native-tls",
] } ] }
openssl = { version = "0.10.72", features = ["vendored"] } openssl = { version = "0.10.73", features = ["vendored"] }
rand = "0.8.5" rand = "0.9.2"
scraper = "0.20.0" scraper = "0.23.1"
async-recursion = "1.1.1" async-recursion = "1.1.1"
[profile.release] [profile.release]

View file

@ -4,7 +4,7 @@ use {
utils, utils,
}, },
futures::stream::StreamExt, futures::stream::StreamExt,
rand::{distributions::Alphanumeric, thread_rng as rng, Rng}, rand::{distr::Alphanumeric, rng, Rng},
reqwest::{ reqwest::{
header::{CONTENT_LENGTH, CONTENT_TYPE, USER_AGENT}, header::{CONTENT_LENGTH, CONTENT_TYPE, USER_AGENT},
redirect::Policy, redirect::Policy,
@ -15,6 +15,7 @@ use {
}; };
#[must_use] #[must_use]
#[allow(clippy::similar_names)]
pub async fn return_http_data(options: &LibOptions, from_cli: bool) -> HashMap<String, HttpData> { pub async fn return_http_data(options: &LibOptions, from_cli: bool) -> HashMap<String, HttpData> {
let threads = options.hosts.len().min(options.threads); let threads = options.hosts.len().min(options.threads);

View file

@ -1,4 +1,4 @@
use rand::{seq::SliceRandom, thread_rng}; use rand::{rng, seq::IndexedRandom};
#[must_use] #[must_use]
pub fn user_agents() -> Vec<String> { pub fn user_agents() -> Vec<String> {
@ -37,7 +37,7 @@ pub fn user_agents() -> Vec<String> {
pub fn return_random_user_agent(strings: &[String]) -> String { pub fn return_random_user_agent(strings: &[String]) -> String {
let empty_string = String::new(); let empty_string = String::new();
strings strings
.choose(&mut thread_rng()) .choose(&mut rng())
.unwrap_or(&empty_string) .unwrap_or(&empty_string)
.to_string() .to_string()
} }