mirror of
https://github.com/edu4rdshl/fhc.git
synced 2026-07-17 23:24:50 +00:00
(chore): update dependencies and fix code to match them
This commit is contained in:
parent
99db1a4b29
commit
291f8dfe9e
4 changed files with 359 additions and 408 deletions
748
Cargo.lock
generated
748
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
12
Cargo.toml
12
Cargo.toml
|
|
@ -12,17 +12,17 @@ readme = "README.md"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "1.44.2", features = ["full", "io-util"] }
|
||||
tokio = { version = "1.47.0", features = ["full", "io-util"] }
|
||||
futures = "0.3.31"
|
||||
clap = { version = "4.5.37", features = ["derive"] }
|
||||
reqwest = { version = "0.12.15", features = [
|
||||
clap = { version = "4.5.41", features = ["derive"] }
|
||||
reqwest = { version = "0.12.22", features = [
|
||||
"hickory-dns",
|
||||
"rustls-tls",
|
||||
"native-tls",
|
||||
] }
|
||||
openssl = { version = "0.10.72", features = ["vendored"] }
|
||||
rand = "0.8.5"
|
||||
scraper = "0.20.0"
|
||||
openssl = { version = "0.10.73", features = ["vendored"] }
|
||||
rand = "0.9.2"
|
||||
scraper = "0.23.1"
|
||||
async-recursion = "1.1.1"
|
||||
|
||||
[profile.release]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use {
|
|||
utils,
|
||||
},
|
||||
futures::stream::StreamExt,
|
||||
rand::{distributions::Alphanumeric, thread_rng as rng, Rng},
|
||||
rand::{distr::Alphanumeric, rng, Rng},
|
||||
reqwest::{
|
||||
header::{CONTENT_LENGTH, CONTENT_TYPE, USER_AGENT},
|
||||
redirect::Policy,
|
||||
|
|
@ -15,6 +15,7 @@ use {
|
|||
};
|
||||
|
||||
#[must_use]
|
||||
#[allow(clippy::similar_names)]
|
||||
pub async fn return_http_data(options: &LibOptions, from_cli: bool) -> HashMap<String, HttpData> {
|
||||
let threads = options.hosts.len().min(options.threads);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use rand::{seq::SliceRandom, thread_rng};
|
||||
use rand::{rng, seq::IndexedRandom};
|
||||
|
||||
#[must_use]
|
||||
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 {
|
||||
let empty_string = String::new();
|
||||
strings
|
||||
.choose(&mut thread_rng())
|
||||
.choose(&mut rng())
|
||||
.unwrap_or(&empty_string)
|
||||
.to_string()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue