added a module to copy the command to run a portscan for the scope, and

added the ability to add new configs to separate projects, like work vs
personal. Also added a way to switch between these configs.
This commit is contained in:
2026-08-19 16:56:27 -05:00
parent e28306d07d
commit 8ab7a2bec4
10 changed files with 759 additions and 291 deletions
+21 -4
View File
@@ -1,7 +1,10 @@
use clap::Parser;
use rand::RngExt;
use rand::distr::Alphanumeric;
use std::sync::mpsc::channel;
use std::sync::{Arc, Mutex};
use std::thread::{sleep, spawn};
use std::time::Duration;
use std::{env, path::PathBuf, process::exit};
use sysinfo::*;
use tetanus::funcs::*;
@@ -138,8 +141,8 @@ async fn main() {
);
exit(1);
}
let (mut appstate, rx) = AppState::new();
let config_load = appstate.load_config(client_config_path.clone());
let (mut appstate) = AppState::new();
let config_load = appstate.load_config(client_config_path.clone(), true);
if config_load.is_err() {
eprintln!("error loading config!");
exit(1);
@@ -148,9 +151,23 @@ async fn main() {
banner.lines().for_each(|line| {
appstate.output.push(line.to_string());
});
appstate.initialize_modules();
let handles = Arc::new(Mutex::new(Vec::new()));
let handles_clone = handles.clone();
println!("entering tui...");
let _res = run_tui(appstate, rx).unwrap();
let primary_handle = spawn(move || {
let _ = startup(appstate, false, handles_clone);
});
if let Ok(mut lock) = handles.lock() {
lock.push(primary_handle);
}
loop {
sleep(Duration::from_secs(3));
if let Ok(lock) = handles.lock() {
if lock.iter().all(|handle| handle.is_finished()) {
break;
}
}
}
} else if args.server {
let mut address = "127.0.0.1:31337".to_string();
let mut certificate_path = config_path.clone();