Fixed the installer on Kali linux

This commit is contained in:
pyro57000
2025-04-05 17:49:16 -05:00
parent fc316c2a71
commit 2e839adccf
3 changed files with 27 additions and 20 deletions

View File

@@ -43,6 +43,10 @@ pub fn project_standalone_terminal(project: Project, mut terminal: String){
if terminal.contains("profile"){
profile = true;
}
if terminal.contains("!!!"){
let terminal_launch_cmd = format!("distrobox enter --root {}", &project.boxname);
terminal = terminal.replace("!!!", &terminal_launch_cmd);
}
let terminal_vec:Vec<&str> = terminal.split(" ").collect();
let mut terminal_start = process::Command::new(terminal_vec[0]);
let mut first = true;

View File

@@ -6,9 +6,10 @@ use std::io::Write;
use std::io::stdin;
use std::io::copy;
use std::process::Command;
use std::time::Duration;
use reqwest::blocking::get;
use std::{path::Path, path::PathBuf};
use std::process;
use std::{process, thread};
use std::process::exit;
use directories::UserDirs;
@@ -35,7 +36,6 @@ pub fn install(config_path: &PathBuf){
let mut password_path = config_folder_path.clone();
password_path.push("password_spray.md");
let mut projects_conf_path = config_folder_path.clone();
projects_conf_path.push("projects.");
let mut bell_file_path = config_folder_path.clone();
let del_on_fail = config_folder_path.clone();
projects_conf_path.push("projects.conf");
@@ -94,7 +94,7 @@ pub fn install(config_path: &PathBuf){
for name in distrobox_names{
if !name.contains("NAME"){
have_box = true;
println!("name")
println!("{}", name);
}
}
let mut template_box_name = String::new();
@@ -144,15 +144,16 @@ pub fn install(config_path: &PathBuf){
println!("ok free loader");
}
let fingerprint = get_user_input("will you be using fingerprint authentication for your distroboxes?").to_lowercase();
let terminal = String::new();
let mut terminal = String::new();
for desktop in _terminal_commands.keys(){
println!("{}", desktop);
}
let desktop_response = get_user_input("do you use any of these desktops?").to_lowercase();
if desktop_response.contains("y"){
let default_response = get_user_input("do you use the default terminal for your desktop?").to_lowercase();
if default_response.contains("y"){
let de = get_user_input("which desktop do you use?");
terminal = _terminal_commands[&de];
terminal = _terminal_commands[&de.as_str()].to_owned();
}
}
else{
@@ -161,7 +162,6 @@ pub fn install(config_path: &PathBuf){
println!("konsole -e !!!");
terminal = get_user_input("");
}
}
if terminal.contains("konsole"){
println!("do you use a specific profile for your attack boxes?");
println!("this is pretty specific to Pyro's setup, so you probably don't");
@@ -185,6 +185,7 @@ pass_file:{}
fingerprint:{}"
, &current_projects.display(), &current_notes.display(), &tools.display(), &upcoming_projects.display(), &upcoming_notes.display(), &template_box_name, &terminal, cracking_rig, rockyou, rule, &password_path.display(), fingerprint);
println!("cool everything, all folders and settings have been entered, now let's save this to a config file...");
thread::sleep(Duration::from_secs(3));
let mut config_file_res = File::create_new(config_path);
if config_file_res.is_err(){
println!("ooof error creating configuration file...");
@@ -206,6 +207,7 @@ fingerprint:{}"
println!("creating project configuration file, and poplulating it with the default project...");
let project_conf_res = File::create_new(&projects_conf_path);
if project_conf_res.is_err(){
let error = project_conf_res.err().unwrap();
println!("ooof error creating the projects configuration file.");
println!("try creating it manually!");
println!("copy the following configuration and save it to {}", &projects_conf_path.display());
@@ -225,7 +227,7 @@ fingerprint:{}"
println!("error creating password spray file");
exit(1);
}
let password_file = password_file_res.unwrap();
let mut password_file = password_file_res.unwrap();
let password_write_res = write!(password_file, "
- [ ] useraspass
- [ ] Seasonyear!
@@ -258,10 +260,11 @@ fingerprint:{}"
- [ ] Service!
- [ ] Serviceyear!
");
if password_file_res.is_err(){
if password_write_res.is_err(){
println!("error writing password file");
exit(1);
}
password_write_res.unwrap();
println!("install completed successfully!");
println!("re-run this to launch!");
}

View File

@@ -98,7 +98,7 @@ pub fn main_menu(mut projects: Vec<Project>, config_path: PathBuf, base_files: &
NOTE OPTION 18 WILL SAVE YOUR PROJECTS BEFORE QUITTING
NOTE OPTION 26 WILL SAVE YOUR PROJECTS BEFORE QUITTING
base prject folder: {}
upcoming project folder: {}