From 7ba70d03b703b1a6b6bfbad8e8e4fac9e3672f75 Mon Sep 17 00:00:00 2001 From: Pyro57000 <147988717+Pyro57000@users.noreply.github.com> Date: Tue, 11 Jun 2024 20:12:12 +0000 Subject: [PATCH] Update main.rs added the functionality to run my initial recon script to import nessus findings from external scans into obsidian --- pentest_tool/src/main.rs | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/pentest_tool/src/main.rs b/pentest_tool/src/main.rs index bd79ea6..6a106b2 100644 --- a/pentest_tool/src/main.rs +++ b/pentest_tool/src/main.rs @@ -473,6 +473,19 @@ fn gnerate_userpass(project: &Project){ } } +fn run_initial_enum(project: &Project){ + let mut csv = String::new(); + println!("path to the csv?"); + std::io::stdin().read_line(&mut csv).unwrap(); + let status = process::Command::new("initial_recon").arg(&csv).arg(&project.customer).arg(&project.project_name).status().expect("error running initial_recon program"); + if status.success(){ + println!("execllent! hosts should be imported to {}/host_notes.md", &project.notes_folder.display()); + } + else{ + println!("ooof something went wrong, host notes may not have saved correctly!"); + } +} + fn main_menu(mut projects: Vec, config_path: &PathBuf, base_files: &PathBuf, base_notes: &PathBuf, tools_dir: &PathBuf, boxtemplate: String){ let mut loopize = true; @@ -545,9 +558,10 @@ Current Project: {} {} 10.) Open Project Files Folder In Dolphin 11.) Open Project Notes Folder In Dolphin 12.) generate userpass file from your obsidian notes - 13.) Print Project Info For Report - 14.) Stop All Distroboxes - 15.) Quit Application + 13.) run pyro's initail enum script on a nessus csv for the current project + 14.) Print Project Info For Report + 15.) Stop All Distroboxes + 16.) Quit Application \n", active_project.customer, active_project.project_name); std::io::stdin().read_line(&mut response).expect("error getting menu input"); clear().expect("error clearing screen"); @@ -567,9 +581,10 @@ Current Project: {} {} "10" => open_in_dolphin("files", active_project.clone()), "11" => open_in_dolphin("notes", active_project.clone()), "12" => gnerate_userpass(&active_project), - "13" => print_report_information(active_project.clone()), - "14" => stop_all_boxes(&projects), - "15" => {save_projects(&projects, &config_path); + "13" => run_initial_enum(&active_project), + "14" => print_report_information(active_project.clone()), + "15" => stop_all_boxes(&projects), + "16" => {save_projects(&projects, &config_path); let mut stop = String::new(); println!("stop all boxes?\ny/n"); std::io::stdin().read_line(&mut stop).unwrap();