Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c97e05008d |
81
src/main.rs
81
src/main.rs
@@ -23,7 +23,7 @@ struct Args{
|
|||||||
#[arg(short, long, help = "path to save output file Defaults to not saving output.")]
|
#[arg(short, long, help = "path to save output file Defaults to not saving output.")]
|
||||||
outfile: Option<PathBuf>,
|
outfile: Option<PathBuf>,
|
||||||
|
|
||||||
#[arg(short, long, help = "number of threads to use, default to 10. \nNote thre thread count will be doubled, one set for share finder tasks, and one set for file and infor finding tasks.")]
|
#[arg(short, long, help = "number of threads to use, default to 10. \\nNote thre thread count will be doubled, one set for share finder tasks, and one set for file and infor finding tasks.")]
|
||||||
threads: Option<usize>,
|
threads: Option<usize>,
|
||||||
|
|
||||||
#[arg(short, long, help = "specific targets. should be comma separated.")]
|
#[arg(short, long, help = "specific targets. should be comma separated.")]
|
||||||
@@ -197,6 +197,77 @@ async fn task_handler(id: usize, current_task: FinderTask, tx: Sender<Message>){
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main(){
|
async fn main(){
|
||||||
|
print!{
|
||||||
|
"
|
||||||
|
██▒▒
|
||||||
|
▒▒████ ▓▓████████▓▓
|
||||||
|
▒▒██████████ ██████████████
|
||||||
|
██████████████ ▒▒██████████████
|
||||||
|
████████████████ ████████████████
|
||||||
|
████████████████▓▓ ▓▓████████████████
|
||||||
|
██████████████████▓▓██████████████████████
|
||||||
|
██████████████████████████████████████████ ▓▓██
|
||||||
|
██████████████████████████████████████████ ▒▒████████
|
||||||
|
▒▒████ ██████████████████████████████████████████████ ██████████████
|
||||||
|
████████▓▓ ▒▒██████████████████████████████████████████████████████████████████
|
||||||
|
████████████████▓▓████████████████████████████████████████████████████████████████████████
|
||||||
|
██████████████████████████████████████████████████████████████████████████████████████████▓▓
|
||||||
|
████████████████████████████████████████▓▓ ▓▓██████████████████████████████████
|
||||||
|
██████████████████████████████████▓▓ ████████████████████████████▒▒
|
||||||
|
██████████████████████████████ ████████████████████████
|
||||||
|
████████████████████████▓▓ ▓▓██████████████████
|
||||||
|
▒▒████████████████████▒▒ ████████████████
|
||||||
|
▒▒████████████████▒▒ /----------------------------------\\ ██████████████
|
||||||
|
██████████████▓▓ / \\ ████████████▓▓
|
||||||
|
██████████████ / \\ ▓▓████████████████████▓▓▓▓
|
||||||
|
▓▓████████████░░ / \\ ████████████████████████
|
||||||
|
░░██████████████ / |-| |-| \\ ▓▓██████████████████████▓▓
|
||||||
|
████████████████████████░░ / | | | | \\ ████████████████████████
|
||||||
|
▓▓██████████████████████████ / | | | | \\ ████████████████████████
|
||||||
|
██████████████████████████▒▒ / | | | | \\ ▒▒██████████████████████
|
||||||
|
██████████████████████████ / | | | | \\ ██████████████████████
|
||||||
|
░░██████████████████████████ / | | | | \\ ████████████████████▓▓
|
||||||
|
▒▒██████████████████████████ / | | | | \\ ████████████████▓▓
|
||||||
|
▓▓██████████████████████████ \\ | | | | / ██████████████
|
||||||
|
▓▓██████████████████████ \\ | | | | / ████████████
|
||||||
|
▓▓████████████████ \\ | | | | / ████████████
|
||||||
|
▓▓████████████ \\ | | | | / ████████████
|
||||||
|
████████████ \\ | | | | / ████████████
|
||||||
|
████████████▒▒ \\ | | | | / ██████████████▒▒
|
||||||
|
██████████████ \\ |-| |-| / ▓▓████████████████▓▓
|
||||||
|
██████████████ \\ / ██████████████████████
|
||||||
|
▒▒██████████████████ \\ / ▒▒████████████████████████
|
||||||
|
██████████████████████ \\ / ████████████████████████
|
||||||
|
██████████████████████████ \\----------------------------------/ ▓▓████████████████████████
|
||||||
|
██████████████████████████████ ░░████████████████████████▓▓
|
||||||
|
██████████████████████████████▒▒ ██████████████████████████
|
||||||
|
░░██████████████████████████████░░ ██████████████░░ ▒▒██████
|
||||||
|
████████████████████████████████ ████████████████
|
||||||
|
▒▒████████████████████████████████░░ ▒▒████████████████
|
||||||
|
██████▓▓▒▒ ██████████████████ ████████████████████
|
||||||
|
████████████████████▒▒ ▒▒████████████████████████
|
||||||
|
██████████████████████████▓▓▓▓▓▓████████████████████████████████▒▒
|
||||||
|
██████████████████████████████████████████████████████████████████
|
||||||
|
██████████████████████████████████████████████████████████████████
|
||||||
|
▓▓████████████████████████████████████████████████████████████████████
|
||||||
|
██████████████████████████████████████████████ ░░██████████████████
|
||||||
|
░░████████████████▒▒ ▒▒██████████████████ ████████████▒▒
|
||||||
|
▒▒██████████████ ████████████████ ██████
|
||||||
|
▓▓████████ ▓▓██████████████ ▒▒
|
||||||
|
▒▒████▒▒ ██████████████
|
||||||
|
██████████████
|
||||||
|
██████████████
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
__ __
|
||||||
|
/ _\\_ __ __ _ / _| ___ _ __ _ __ ___ _ _ ___
|
||||||
|
\\ \\| '_ \\ / _` | |_ / _ \\ '__| '__/ _ \\| | | / __|
|
||||||
|
_\\ \\ | | | (_| | _| __/ | | | | (_) | |_| \\__ \\
|
||||||
|
\\__/_| |_|\\__,_|_| \\___|_| |_| \\___/ \\__,_|___/
|
||||||
|
"
|
||||||
|
|
||||||
|
}
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
let mut outfile = PathBuf::new();
|
let mut outfile = PathBuf::new();
|
||||||
let mut threads = 10;
|
let mut threads = 10;
|
||||||
@@ -228,7 +299,7 @@ async fn main(){
|
|||||||
let command_string = String::from("net group \"domain computers\" /domain");
|
let command_string = String::from("net group \"domain computers\" /domain");
|
||||||
let mut temp_file = fs::File::create("./temp.bat").unwrap();
|
let mut temp_file = fs::File::create("./temp.bat").unwrap();
|
||||||
write!(temp_file, "{}", command_string).unwrap();
|
write!(temp_file, "{}", command_string).unwrap();
|
||||||
let computer_res = Command::new(".\\temp.bat").output();
|
let computer_res = Command::new(".\\\\temp.bat").output();
|
||||||
let mut error_string = String::new();
|
let mut error_string = String::new();
|
||||||
let mut success_string = String::new();
|
let mut success_string = String::new();
|
||||||
fs::remove_file("./temp.bat").unwrap();
|
fs::remove_file("./temp.bat").unwrap();
|
||||||
@@ -331,7 +402,7 @@ async fn main(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
let mut save_file = open_res.unwrap();
|
let mut save_file = open_res.unwrap();
|
||||||
let write_res = write!(save_file,"share found! {}\n", finding.path);
|
let write_res = write!(save_file,"share found! {}\\n", finding.path);
|
||||||
if write_res.is_err(){
|
if write_res.is_err(){
|
||||||
if !continue_wihtout_save{
|
if !continue_wihtout_save{
|
||||||
eprintln!("{}", "error writing to save file!".red());
|
eprintln!("{}", "error writing to save file!".red());
|
||||||
@@ -383,7 +454,7 @@ async fn main(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
let mut save_file = open_res.unwrap();
|
let mut save_file = open_res.unwrap();
|
||||||
let write_res = write!(save_file,"keyword match at {}\n", finding.path);
|
let write_res = write!(save_file,"keyword match at {}\\n", finding.path);
|
||||||
if write_res.is_err(){
|
if write_res.is_err(){
|
||||||
if !continue_wihtout_save{
|
if !continue_wihtout_save{
|
||||||
eprintln!("{}", "error writing to save file!".red());
|
eprintln!("{}", "error writing to save file!".red());
|
||||||
@@ -428,7 +499,7 @@ async fn main(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
let mut save_file = open_res.unwrap();
|
let mut save_file = open_res.unwrap();
|
||||||
let write_res = write!(save_file,"file found! {}\n", finding.path);
|
let write_res = write!(save_file,"file found! {}\\n", finding.path);
|
||||||
if write_res.is_err(){
|
if write_res.is_err(){
|
||||||
if !continue_wihtout_save{
|
if !continue_wihtout_save{
|
||||||
eprintln!("{}", "error writing to save file!".red());
|
eprintln!("{}", "error writing to save file!".red());
|
||||||
|
|||||||
Reference in New Issue
Block a user