mirror of
https://github.com/edu4rdshl/rusolver.git
synced 2026-07-17 23:24:55 +00:00
(fix): only print valid data to stdout
A regression was introduced during the refactoring that makes rusolver print all the domains, even if they were invalid, this fixes that Fixes #14
This commit is contained in:
parent
28b29ca515
commit
206c392fc0
1 changed files with 6 additions and 4 deletions
|
|
@ -89,11 +89,13 @@ pub async fn detect_wildcards(
|
|||
}
|
||||
|
||||
pub fn print_domain_data(host: &str, domain_data: &DomainData, options: &LibOptions) {
|
||||
if options.show_ip_address && !domain_data.is_wildcard {
|
||||
println!("{}: {:?}", host, domain_data.ipv4_addresses);
|
||||
if !domain_data.is_wildcard && !domain_data.ipv4_addresses.is_empty() {
|
||||
if options.show_ip_address {
|
||||
println!("{}:{:?}", host, domain_data.ipv4_addresses);
|
||||
} else {
|
||||
println!("{}", host);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn return_resolver_opts(timeout: u64, retries: usize) -> ResolverOpts {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue