Skip to content

Commit fe65240

Browse files
committed
added a check to make sure cobalt strike exists
before spawning a thread.
1 parent 967052a commit fe65240

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pentest_tool/src/box_controls.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ pub fn clean_unused_boxes(projects: &Vec<Project>, boxtemplate: &String) -> Opti
181181
}
182182

183183
pub fn launch_cobalt_strike(project: Project) -> Option<JoinHandle<()>>{
184+
let mut check_path = PathBuf::new();
185+
check_path.push(&project.files_folder);
186+
check_path.push("cobaltstrike/client");
187+
if check_path.as_path().exists() == false{
188+
println!("looks like you don't have cobalt strike set up on this beacon... try copying your cobalt strike folder here!");
189+
return None;
190+
}
184191
let handle = thread::spawn(move ||{
185192
let mut cs_dir = PathBuf::new();
186193
cs_dir.push(project.files_folder);

0 commit comments

Comments
 (0)