added logic to save already sprayed passwords
based on passwordspray markdown file.
This commit is contained in:
@@ -371,6 +371,7 @@ pub fn password_spray_help(project: &Project, season: String, lseason: String, y
|
|||||||
password_spray_string = password_spray_read_result.unwrap();
|
password_spray_string = password_spray_read_result.unwrap();
|
||||||
}
|
}
|
||||||
let mut passwords = Vec::new();
|
let mut passwords = Vec::new();
|
||||||
|
let mut sprayed_passwords = Vec::new();
|
||||||
println!("loading lines to parse...");
|
println!("loading lines to parse...");
|
||||||
for line in password_spray_string.split("\n"){
|
for line in password_spray_string.split("\n"){
|
||||||
if line.len() > 3{
|
if line.len() > 3{
|
||||||
@@ -395,6 +396,12 @@ pub fn password_spray_help(project: &Project, season: String, lseason: String, y
|
|||||||
}
|
}
|
||||||
passwords.push(password);
|
passwords.push(password);
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
let words: Vec<&str> = line.split_whitespace().collect();
|
||||||
|
let password = words.last().unwrap().to_string();
|
||||||
|
println!("{} already sprayed, making note...", &password);
|
||||||
|
sprayed_passwords.push(password);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println!("passwords loaded, and parsed!");
|
println!("passwords loaded, and parsed!");
|
||||||
@@ -405,7 +412,6 @@ pub fn password_spray_help(project: &Project, season: String, lseason: String, y
|
|||||||
"2\n" => outline = msolspray_config(tools_dir),
|
"2\n" => outline = msolspray_config(tools_dir),
|
||||||
_ => println!("unkown tool to use, try again...")
|
_ => println!("unkown tool to use, try again...")
|
||||||
}
|
}
|
||||||
let mut sprayed_passwords = Vec::new();
|
|
||||||
for password in &passwords{
|
for password in &passwords{
|
||||||
let mut _spraycontinue = String::new();
|
let mut _spraycontinue = String::new();
|
||||||
let mut printline = outline.replace("||PASSWORD||", password);
|
let mut printline = outline.replace("||PASSWORD||", password);
|
||||||
|
|||||||
Reference in New Issue
Block a user