Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90aa4a1b28 |
65
src/main.rs
65
src/main.rs
@@ -17,7 +17,10 @@ struct Args{
|
|||||||
outfile: Option<PathBuf>,
|
outfile: Option<PathBuf>,
|
||||||
|
|
||||||
#[arg(short, long, help = "number of threads to use, default to 10.")]
|
#[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{
|
struct ShareFinder{
|
||||||
@@ -74,10 +77,53 @@ async fn find_shares(task: ShareFinder, mut rx: Receiver<String>){
|
|||||||
|
|
||||||
#[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;
|
||||||
let mut save = false;
|
let mut save = false;
|
||||||
|
let mut computers = Vec::new();
|
||||||
if args.outfile.is_some(){
|
if args.outfile.is_some(){
|
||||||
outfile = args.outfile.unwrap();
|
outfile = args.outfile.unwrap();
|
||||||
save = true;
|
save = true;
|
||||||
@@ -85,6 +131,21 @@ async fn main(){
|
|||||||
if args.threads.is_some(){
|
if args.threads.is_some(){
|
||||||
threads = args.threads.unwrap();
|
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...");
|
println!("finding computers...");
|
||||||
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();
|
||||||
@@ -110,7 +171,6 @@ async fn main(){
|
|||||||
eprintln!("{}", error_string.red());
|
eprintln!("{}", error_string.red());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
let mut computers = Vec::new();
|
|
||||||
if success_string.len() > 0{
|
if success_string.len() > 0{
|
||||||
for line in success_string.lines(){
|
for line in success_string.lines(){
|
||||||
if line.contains("$"){
|
if line.contains("$"){
|
||||||
@@ -124,6 +184,7 @@ async fn main(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
println!("computer enumeration finished, starting task finder threads...");
|
println!("computer enumeration finished, starting task finder threads...");
|
||||||
if threads > computers.len(){
|
if threads > computers.len(){
|
||||||
threads = computers.len();
|
threads = computers.len();
|
||||||
|
|||||||
Reference in New Issue
Block a user