Skip to content

Commit ff33b36

Browse files
authored
Update main.rs
1 parent 28bab70 commit ff33b36

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ use std::path::PathBuf;
1717
use std::sync::Arc;
1818
use std::thread;
1919
use regex::Regex;
20-
use rand::seq::SliceRandom;
21-
20+
use rand::prelude::IndexedRandom;
2221

2322
#[derive(Debug, StructOpt)]
2423
#[structopt(name = "pulse", about = "Red Team fast and efficient target detection tool.")]
@@ -366,11 +365,11 @@ async fn main() -> Result<()> {
366365
// Determine User-Agent
367366
let ua: &str = match ua_option.as_str() {
368367
"random" => {
369-
let mut rng = rand::thread_rng();
368+
let mut rng = rand::rng();
370369
http_uas_clone.choose(&mut rng).expect("No User-Agents available")
371370
},
372371
"android" => {
373-
let mut rng = rand::thread_rng();
372+
let mut rng = rand::rng();
374373
android_uas_clone.choose(&mut rng).expect("No Android User-Agents available")
375374
},
376375
_ => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3", // default UA

0 commit comments

Comments
 (0)