added the ability to specify targets
also added ascii art!
This commit is contained in:
65
src/main.rs
65
src/main.rs
@@ -17,7 +17,10 @@ struct Args{
|
||||
outfile: Option<PathBuf>,
|
||||
|
||||
#[arg(short, long, help = "number of threads to use, default to 10.")]
|
||||
threads: Option<usize>
|
||||
threads: Option<usize>,
|
||||
|
||||
#[arg(short, long, help = "specific targets. should be comma separated.")]
|
||||
targets: Option<String>,
|
||||
}
|
||||
|
||||
struct ShareFinder{
|
||||
@@ -74,10 +77,53 @@ async fn find_shares(task: ShareFinder, mut rx: Receiver<String>){
|
||||
|
||||
#[tokio::main]
|
||||
async fn main(){
|
||||
print!{"
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
||||
⣿⣿⣿⡿⠋⠁⠙⠿⠿⠟⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
||||
⣿⣿⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
||||
⣿⣿⣿⡿⠁⠀⢀⣴⣾⣷⣦⡀⠀⠈⠉⠉⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
||||
⣿⡇⠀⠀⠀⠀⢸⣿⣿⣿⣿⡇⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
|
||||
⣿⣧⣤⣤⣄⠀⠈⠛⠿⠿⠋⠀⠀⣰⡿⠿⣿⣿⣿⣿⠁⠀⠀⢸⣿⣿⣿⣿⠿⣿
|
||||
⣿⣿⣿⣿⣿⠁⠀⠀⢀⣀⡀⠀⠀⠈⠀⠀⠘⣿⠿⠿⠀⠀⠀⠸⠿⢿⣿⠃⠀⣿
|
||||
⣿⣿⣿⣿⣇⣀⠀⢀⣿⣿⣿⣄⣀⣴⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣾⡿⠋⠛⠿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⠀⠀⠀⠀⠀⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⣿
|
||||
⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⣿
|
||||
⣿⣿⣿⣿⣿⣿⣧⣤⣤⣄⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⠟⠀⠀⠀⣿
|
||||
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣤⣤⣤⣤⣤⣤⣤⣤⣽⣿⣿⣿⣿⣭⣤⣤⣤⣤⣿
|
||||
|
||||
|
||||
( ( ( )
|
||||
)\\))( ' ( )\\ ) ( ( /(
|
||||
((_)()\\ ) ))((_)( ( ( ))\\ )\\())(
|
||||
_(())\\_)()/((_) )\\ )\\ )\\ '/((_) (_))/ )\\
|
||||
\\ \\((_)/ (_))| |((_|(_)_((_))(_)) | |_ ((_)
|
||||
\\ \\/\\/ // -_) / _/ _ \\ ' \\() -_) | _/ _ \\
|
||||
\\_/\\_/ \\___|_\\__\\___/_|_|_|\\___| \\__\\___/
|
||||
* ) ) )
|
||||
` ) /( ( ( /( ) ( ( /( ) ( ( ( ) (
|
||||
( )(_))))\\ )\\()| /( ( ))\\ ( ( )\\())( /( )( ))\\( ))\\( /( ))\\
|
||||
(_(_())/((_|_))/)(_)) )\\ ) /((_))\\ )\\((_)\\ )(_)|()\\ /((_)\\ /((_)\\())((_)
|
||||
|_ _(_)) | |_((_)_ _(_/((_))(((_) ((_) |(_|(_)_ ((_|_))((_) (_))((_)(_))
|
||||
| | / -_)| _/ _` | ' \\)) || (_-< (_-< ' \\/ _` | '_/ -_|_-<_/ -_) \\ / -_)
|
||||
|_| \\___| \\__\\__,_|_||_| \\_,_/__/___/__/_||_\\__,_|_| \\___/__(_)___/_\\_\\___|(
|
||||
( ) ) |___(_| ) ) )\\ ) ) )\\ ) )
|
||||
)\\ ( ( /(( /( ( ( )\\ ( ( /( ||_( /( (()/(( ( /((()/( ( /(
|
||||
((((_)( ))\\ )\\())\\()) ( )( )((_) ))\\ )\\()|_-<)\\()) /(_))\\ ) )\\())/(_)))\\())
|
||||
)\\ _ )\\ /((_|_))((_)\\ )\\(()\\ _ ((_)_ /((_)((_)\\/ _(_))/ (_))(()/( ((_)\\(_)) ((_)\\
|
||||
(_)_\\(_|_))(| |_| |(_)((_)((_|_) | _ |_))(| | (_)||| |_ | _ \\)(_)) | (_) _ \\/ (_)
|
||||
/ _ \\ | || | _| ' \\/ _ \\ '_|_ | _ \\ || |_ _| | _| | _/ || |_ _|| / () |
|
||||
/_/ \\_\\ \\_,_|\\__|_||_\\___/_| (_) |___/\\_,_| |_| \\__|___|_| \\_, | |_| |_|_\\\\__/
|
||||
|_____| |__/
|
||||
|
||||
"}
|
||||
let args = Args::parse();
|
||||
let mut outfile = PathBuf::new();
|
||||
let mut threads = 10;
|
||||
let mut save = false;
|
||||
let mut computers = Vec::new();
|
||||
if args.outfile.is_some(){
|
||||
outfile = args.outfile.unwrap();
|
||||
save = true;
|
||||
@@ -85,6 +131,21 @@ async fn main(){
|
||||
if args.threads.is_some(){
|
||||
threads = args.threads.unwrap();
|
||||
}
|
||||
if args.targets.is_some(){
|
||||
println!("gathering the targets you gave me.");
|
||||
let targets = args.targets.unwrap();
|
||||
if targets.contains(","){
|
||||
let split_targets: Vec<&str> = targets.split(",").collect();
|
||||
for target in split_targets{
|
||||
computers.push(target.to_string());
|
||||
}
|
||||
}
|
||||
else{
|
||||
computers.push(targets);
|
||||
}
|
||||
}
|
||||
else{
|
||||
println!("no targets given, proceeding with domain computer enumeration...");
|
||||
println!("finding computers...");
|
||||
let command_string = String::from("net group \"domain computers\" /domain");
|
||||
let mut temp_file = fs::File::create("./temp.bat").unwrap();
|
||||
@@ -110,7 +171,6 @@ async fn main(){
|
||||
eprintln!("{}", error_string.red());
|
||||
exit(1);
|
||||
}
|
||||
let mut computers = Vec::new();
|
||||
if success_string.len() > 0{
|
||||
for line in success_string.lines(){
|
||||
if line.contains("$"){
|
||||
@@ -124,6 +184,7 @@ async fn main(){
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
println!("computer enumeration finished, starting task finder threads...");
|
||||
if threads > computers.len(){
|
||||
threads = computers.len();
|
||||
|
||||
Reference in New Issue
Block a user