Fixed the installer on Kali linux
This commit is contained in:
@@ -43,6 +43,10 @@ pub fn project_standalone_terminal(project: Project, mut terminal: String){
|
|||||||
if terminal.contains("profile"){
|
if terminal.contains("profile"){
|
||||||
profile = true;
|
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 terminal_vec:Vec<&str> = terminal.split(" ").collect();
|
||||||
let mut terminal_start = process::Command::new(terminal_vec[0]);
|
let mut terminal_start = process::Command::new(terminal_vec[0]);
|
||||||
let mut first = true;
|
let mut first = true;
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ use std::io::Write;
|
|||||||
use std::io::stdin;
|
use std::io::stdin;
|
||||||
use std::io::copy;
|
use std::io::copy;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
use std::time::Duration;
|
||||||
use reqwest::blocking::get;
|
use reqwest::blocking::get;
|
||||||
use std::{path::Path, path::PathBuf};
|
use std::{path::Path, path::PathBuf};
|
||||||
use std::process;
|
use std::{process, thread};
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use directories::UserDirs;
|
use directories::UserDirs;
|
||||||
|
|
||||||
@@ -35,7 +36,6 @@ pub fn install(config_path: &PathBuf){
|
|||||||
let mut password_path = config_folder_path.clone();
|
let mut password_path = config_folder_path.clone();
|
||||||
password_path.push("password_spray.md");
|
password_path.push("password_spray.md");
|
||||||
let mut projects_conf_path = config_folder_path.clone();
|
let mut projects_conf_path = config_folder_path.clone();
|
||||||
projects_conf_path.push("projects.");
|
|
||||||
let mut bell_file_path = config_folder_path.clone();
|
let mut bell_file_path = config_folder_path.clone();
|
||||||
let del_on_fail = config_folder_path.clone();
|
let del_on_fail = config_folder_path.clone();
|
||||||
projects_conf_path.push("projects.conf");
|
projects_conf_path.push("projects.conf");
|
||||||
@@ -94,7 +94,7 @@ pub fn install(config_path: &PathBuf){
|
|||||||
for name in distrobox_names{
|
for name in distrobox_names{
|
||||||
if !name.contains("NAME"){
|
if !name.contains("NAME"){
|
||||||
have_box = true;
|
have_box = true;
|
||||||
println!("name")
|
println!("{}", name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let mut template_box_name = String::new();
|
let mut template_box_name = String::new();
|
||||||
@@ -144,15 +144,16 @@ pub fn install(config_path: &PathBuf){
|
|||||||
println!("ok free loader");
|
println!("ok free loader");
|
||||||
}
|
}
|
||||||
let fingerprint = get_user_input("will you be using fingerprint authentication for your distroboxes?").to_lowercase();
|
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(){
|
for desktop in _terminal_commands.keys(){
|
||||||
println!("{}", desktop);
|
println!("{}", desktop);
|
||||||
|
}
|
||||||
let desktop_response = get_user_input("do you use any of these desktops?").to_lowercase();
|
let desktop_response = get_user_input("do you use any of these desktops?").to_lowercase();
|
||||||
if desktop_response.contains("y"){
|
if desktop_response.contains("y"){
|
||||||
let default_response = get_user_input("do you use the default terminal for your desktop?").to_lowercase();
|
let default_response = get_user_input("do you use the default terminal for your desktop?").to_lowercase();
|
||||||
if default_response.contains("y"){
|
if default_response.contains("y"){
|
||||||
let de = get_user_input("which desktop do you use?");
|
let de = get_user_input("which desktop do you use?");
|
||||||
terminal = _terminal_commands[&de];
|
terminal = _terminal_commands[&de.as_str()].to_owned();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -161,7 +162,6 @@ pub fn install(config_path: &PathBuf){
|
|||||||
println!("konsole -e !!!");
|
println!("konsole -e !!!");
|
||||||
terminal = get_user_input("");
|
terminal = get_user_input("");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if terminal.contains("konsole"){
|
if terminal.contains("konsole"){
|
||||||
println!("do you use a specific profile for your attack boxes?");
|
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");
|
println!("this is pretty specific to Pyro's setup, so you probably don't");
|
||||||
@@ -185,6 +185,7 @@ pass_file:{}
|
|||||||
fingerprint:{}"
|
fingerprint:{}"
|
||||||
, ¤t_projects.display(), ¤t_notes.display(), &tools.display(), &upcoming_projects.display(), &upcoming_notes.display(), &template_box_name, &terminal, cracking_rig, rockyou, rule, &password_path.display(), fingerprint);
|
, ¤t_projects.display(), ¤t_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...");
|
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);
|
let mut config_file_res = File::create_new(config_path);
|
||||||
if config_file_res.is_err(){
|
if config_file_res.is_err(){
|
||||||
println!("ooof error creating configuration file...");
|
println!("ooof error creating configuration file...");
|
||||||
@@ -206,6 +207,7 @@ fingerprint:{}"
|
|||||||
println!("creating project configuration file, and poplulating it with the default project...");
|
println!("creating project configuration file, and poplulating it with the default project...");
|
||||||
let project_conf_res = File::create_new(&projects_conf_path);
|
let project_conf_res = File::create_new(&projects_conf_path);
|
||||||
if project_conf_res.is_err(){
|
if project_conf_res.is_err(){
|
||||||
|
let error = project_conf_res.err().unwrap();
|
||||||
println!("ooof error creating the projects configuration file.");
|
println!("ooof error creating the projects configuration file.");
|
||||||
println!("try creating it manually!");
|
println!("try creating it manually!");
|
||||||
println!("copy the following configuration and save it to {}", &projects_conf_path.display());
|
println!("copy the following configuration and save it to {}", &projects_conf_path.display());
|
||||||
@@ -225,7 +227,7 @@ fingerprint:{}"
|
|||||||
println!("error creating password spray file");
|
println!("error creating password spray file");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
let password_file = password_file_res.unwrap();
|
let mut password_file = password_file_res.unwrap();
|
||||||
let password_write_res = write!(password_file, "
|
let password_write_res = write!(password_file, "
|
||||||
- [ ] useraspass
|
- [ ] useraspass
|
||||||
- [ ] Seasonyear!
|
- [ ] Seasonyear!
|
||||||
@@ -258,10 +260,11 @@ fingerprint:{}"
|
|||||||
- [ ] Service!
|
- [ ] Service!
|
||||||
- [ ] Serviceyear!
|
- [ ] Serviceyear!
|
||||||
");
|
");
|
||||||
if password_file_res.is_err(){
|
if password_write_res.is_err(){
|
||||||
println!("error writing password file");
|
println!("error writing password file");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
password_write_res.unwrap();
|
||||||
println!("install completed successfully!");
|
println!("install completed successfully!");
|
||||||
println!("re-run this to launch!");
|
println!("re-run this to launch!");
|
||||||
}
|
}
|
||||||
@@ -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: {}
|
base prject folder: {}
|
||||||
upcoming project folder: {}
|
upcoming project folder: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user