added a check to make sure cobalt strike exists

before spawning a thread.
This commit is contained in:
pyro57000
2025-03-13 15:27:15 -05:00
parent 967052a4e2
commit fe6524016f

View File

@@ -181,6 +181,13 @@ pub fn clean_unused_boxes(projects: &Vec<Project>, boxtemplate: &String) -> Opti
} }
pub fn launch_cobalt_strike(project: Project) -> Option<JoinHandle<()>>{ pub fn launch_cobalt_strike(project: Project) -> Option<JoinHandle<()>>{
let mut check_path = PathBuf::new();
check_path.push(&project.files_folder);
check_path.push("cobaltstrike/client");
if check_path.as_path().exists() == false{
println!("looks like you don't have cobalt strike set up on this beacon... try copying your cobalt strike folder here!");
return None;
}
let handle = thread::spawn(move ||{ let handle = thread::spawn(move ||{
let mut cs_dir = PathBuf::new(); let mut cs_dir = PathBuf::new();
cs_dir.push(project.files_folder); cs_dir.push(project.files_folder);