mirror of
https://github.com/house-of-vanity/rexec.git
synced 2025-07-08 09:14:08 +00:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
f56cf593a3 |
@ -202,8 +202,9 @@ fn main() {
|
|||||||
info!("Matched hosts:");
|
info!("Matched hosts:");
|
||||||
let resolved_ips = Arc::new(Mutex::new(Vec::<(String, IpAddr)>::new()));
|
let resolved_ips = Arc::new(Mutex::new(Vec::<(String, IpAddr)>::new()));
|
||||||
|
|
||||||
matched_hosts.par_iter().for_each(|host| {
|
matched_hosts
|
||||||
match lookup_host(&host.name) {
|
.par_iter()
|
||||||
|
.for_each(|host| match lookup_host(&host.name) {
|
||||||
Ok(ips) if !ips.is_empty() => {
|
Ok(ips) if !ips.is_empty() => {
|
||||||
let ip = ips[0];
|
let ip = ips[0];
|
||||||
|
|
||||||
@ -218,7 +219,6 @@ fn main() {
|
|||||||
Err(_) => {
|
Err(_) => {
|
||||||
error!("DNS resolve failed: {}", &host.name.red());
|
error!("DNS resolve failed: {}", &host.name.red());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut hosts_and_ips: HashMap<IpAddr, String> = HashMap::new();
|
let mut hosts_and_ips: HashMap<IpAddr, String> = HashMap::new();
|
||||||
|
Reference in New Issue
Block a user