-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Because of the way the host file works, it can only work on IP addresses.
for ip_or_host in &opts.addresses {
match IpCidr::from_str(ip_or_host) {
Ok(cidr) => cidr.iter().for_each(|ip| ips.push(ip)),
_ => match format!("{}:{}", &ip_or_host, 80).to_socket_addrs() {
Ok(mut iter) => ips.push(iter.nth(0).unwrap().ip()),
_ => {
match read_ips_from_file(ip_or_host.to_owned()) {
Ok(x) => ips.extend(x),
_ => {
warning!(
format!("Host {:?} could not be resolved.", ip_or_host),
opts.greppable,
opts.accessible
);
},
}
}
},
}
}
So the code checks:
- CIDR
- Host
- File
In this order.
But if the file contains:
google.com
192.168.0.0/30
This will not work, as those conversions are done before the file.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working