added command to build the cobalt strike
portscan command based off of the scope in general notes
This commit is contained in:
@@ -144,3 +144,39 @@ pub fn print_report_information(project: Project){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pub fn build_cs_portscan_cmd(project: &Project){
|
||||||
|
let mut general_note_path = project.notes_folder.clone();
|
||||||
|
general_note_path.push("general.md");
|
||||||
|
println!("Reading from: {}", general_note_path.display());
|
||||||
|
let mut ranges = Vec::new();
|
||||||
|
let general_note_string = read_to_string(general_note_path);
|
||||||
|
let mut _note_string = String::new();
|
||||||
|
match general_note_string{
|
||||||
|
Err(error) => {println!("error reading file to string!! {}", error); return;},
|
||||||
|
_=> _note_string = general_note_string.unwrap()
|
||||||
|
}
|
||||||
|
let lines: Vec<&str> = _note_string.split("\n").collect();
|
||||||
|
for line in lines{
|
||||||
|
if line.contains("|"){
|
||||||
|
if line.contains("."){
|
||||||
|
let ip = line.split("|").collect::<Vec<&str>>()[1];
|
||||||
|
if ip.contains(","){
|
||||||
|
let ips: Vec<&str> = ip.split(",").collect();
|
||||||
|
for ip in ips{
|
||||||
|
ranges.push(ip.trim_end().trim_start());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ranges.push(ip.trim_end().trim_start());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let portscan_cmd = "portscan !!! 1-1024,1433,2222,3306,3389,5000-6000,8000,8080,8443 icmp 512";
|
||||||
|
let mut _range_command = String::new();
|
||||||
|
let combined_ranges = ranges.join(",");
|
||||||
|
let final_command = portscan_cmd.replace("!!!", &combined_ranges);
|
||||||
|
println!("{}", final_command);
|
||||||
|
}
|
||||||
@@ -82,7 +82,7 @@ pub fn main_menu(mut projects: Vec<Project>, config_path: PathBuf, base_files: &
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
NOTE OPTION 17 WILL SAVE YOUR PROJECTS BEFORE QUITTING
|
NOTE OPTION 18 WILL SAVE YOUR PROJECTS BEFORE QUITTING
|
||||||
|
|
||||||
Current Project: {} {}
|
Current Project: {} {}
|
||||||
|
|
||||||
@@ -102,8 +102,9 @@ Current Project: {} {}
|
|||||||
13.) run pyro's initail enum script on a nessus csv for the current project
|
13.) run pyro's initail enum script on a nessus csv for the current project
|
||||||
14.) Print Project Info For Report
|
14.) Print Project Info For Report
|
||||||
15.) Build host discovery cmd command from scope in notes
|
15.) Build host discovery cmd command from scope in notes
|
||||||
16.) Stop All Distroboxes
|
16.) build portscan command from scope in notes
|
||||||
17.) Quit Application
|
17.) Stop All Distroboxes
|
||||||
|
18.) Quit Application
|
||||||
\n", active_project.customer, active_project.project_name);
|
\n", active_project.customer, active_project.project_name);
|
||||||
std::io::stdin().read_line(&mut response).expect("error getting menu input");
|
std::io::stdin().read_line(&mut response).expect("error getting menu input");
|
||||||
clear().expect("error clearing screen");
|
clear().expect("error clearing screen");
|
||||||
@@ -126,8 +127,9 @@ Current Project: {} {}
|
|||||||
"13" => info_controls::run_initial_enum(&active_project),
|
"13" => info_controls::run_initial_enum(&active_project),
|
||||||
"14" =>info_controls::print_report_information(active_project.clone()),
|
"14" =>info_controls::print_report_information(active_project.clone()),
|
||||||
"15" => info_controls::build_cmd_for_host_discovery(&active_project),
|
"15" => info_controls::build_cmd_for_host_discovery(&active_project),
|
||||||
"16" => box_controls::stop_all_boxes(&projects),
|
"16" => info_controls::build_cs_portscan_cmd(&active_project),
|
||||||
"17" => {project_controls::save_projects(&projects, &config_path);
|
"17" => box_controls::stop_all_boxes(&projects),
|
||||||
|
"18" => {project_controls::save_projects(&projects, &config_path);
|
||||||
let mut stop = String::new();
|
let mut stop = String::new();
|
||||||
println!("stop all boxes?\ny/n");
|
println!("stop all boxes?\ny/n");
|
||||||
std::io::stdin().read_line(&mut stop).unwrap();
|
std::io::stdin().read_line(&mut stop).unwrap();
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"rustc_fingerprint":1960306743998270933,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.83.0 (90b35a623 2024-11-26)\nbinary: rustc\ncommit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\ncommit-date: 2024-11-26\nhost: x86_64-unknown-linux-gnu\nrelease: 1.83.0\nLLVM version: 19.1.1\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/pyro/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\nfmt_debug=\"full\"\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nub_checks\nunix\n","stderr":""},"14371922958718593042":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/pyro/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
|
{"rustc_fingerprint":8341165477820597886,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/pyro/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.83.0 (90b35a623 2024-11-26)\nbinary: rustc\ncommit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf\ncommit-date: 2024-11-26\nhost: x86_64-unknown-linux-gnu\nrelease: 1.83.0\nLLVM version: 19.1.1\n","stderr":""}},"successes":{}}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
420cfe1cf2649aef
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"rustc":11594289678289209806,"features":"[]","declared_features":"[]","target":17787046329850010275,"profile":18277820415669657429,"path":10602529704205407992,"deps":[[7608783394445712223,"fs_extra",false,11060484244568627901],[8098131096778363033,"clearscreen",false,18399470453688710142],[10212947688942307828,"directories",false,17298080390398466646]],"local":[{"CheckDepInfo":{"dep_info":"release/.fingerprint/pentest_tool-78ca7ad2e5f66f35/dep-bin-pentest_tool","checksum":false}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
||||||
BIN
pentest_tool/target/release/deps/pentest_tool-78ca7ad2e5f66f35
Executable file
BIN
pentest_tool/target/release/deps/pentest_tool-78ca7ad2e5f66f35
Executable file
Binary file not shown.
@@ -0,0 +1,11 @@
|
|||||||
|
/home/pyro/syncs/work_folder/FRSecure/hacking_tools/homegrown/pentest_tool/pentest_tool/target/release/deps/pentest_tool-78ca7ad2e5f66f35: src/main.rs src/install.rs src/menu.rs src/project_controls.rs src/box_controls.rs src/info_controls.rs src/start_pentest.rs
|
||||||
|
|
||||||
|
/home/pyro/syncs/work_folder/FRSecure/hacking_tools/homegrown/pentest_tool/pentest_tool/target/release/deps/pentest_tool-78ca7ad2e5f66f35.d: src/main.rs src/install.rs src/menu.rs src/project_controls.rs src/box_controls.rs src/info_controls.rs src/start_pentest.rs
|
||||||
|
|
||||||
|
src/main.rs:
|
||||||
|
src/install.rs:
|
||||||
|
src/menu.rs:
|
||||||
|
src/project_controls.rs:
|
||||||
|
src/box_controls.rs:
|
||||||
|
src/info_controls.rs:
|
||||||
|
src/start_pentest.rs:
|
||||||
Binary file not shown.
Reference in New Issue
Block a user