Compare commits
1 Commits
v0.1.0
..
6d55d96ca7
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d55d96ca7 |
@@ -1,3 +1,4 @@
|
|||||||
|
address,name
|
||||||
10.3.100.1,Belleville Router
|
10.3.100.1,Belleville Router
|
||||||
10.11.31.3,Belleville VPN 11-31
|
10.11.31.3,Belleville VPN 11-31
|
||||||
10.12.32.1,Belleville VPN 12-32
|
10.12.32.1,Belleville VPN 12-32
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
address,name
|
||||||
10.3.100.1,Belleville Router
|
10.3.100.1,Belleville Router
|
||||||
10.11.31.3,Belleville VPN 11-31
|
10.11.31.3,Belleville VPN 11-31
|
||||||
10.12.32.1,Belleville VPN 12-32
|
10.12.32.1,Belleville VPN 12-32
|
||||||
|
|||||||
+9
-2
@@ -21,7 +21,6 @@ const SECONDS_IN_MINUTE: u32 = 60;
|
|||||||
const SECONDS_IN_HOUR: u32 = SECONDS_IN_MINUTE * 60;
|
const SECONDS_IN_HOUR: u32 = SECONDS_IN_MINUTE * 60;
|
||||||
const SECONDS_IN_DAY: u32 = SECONDS_IN_HOUR * 24;
|
const SECONDS_IN_DAY: u32 = SECONDS_IN_HOUR * 24;
|
||||||
|
|
||||||
|
|
||||||
pub fn duration_to_string(to_convert: Duration) -> String {
|
pub fn duration_to_string(to_convert: Duration) -> String {
|
||||||
let mut total_seconds = to_convert.as_secs() as u32;
|
let mut total_seconds = to_convert.as_secs() as u32;
|
||||||
let mut working_string = String::new();
|
let mut working_string = String::new();
|
||||||
@@ -169,7 +168,15 @@ impl PPState {
|
|||||||
let settings = AppSettings::parse();
|
let settings = AppSettings::parse();
|
||||||
|
|
||||||
print!("Prep to load targets...");
|
print!("Prep to load targets...");
|
||||||
let mut targets = PPState::build_targets_from_file(settings.ping_host_file);
|
let file_to_check = match settings.ping_host_file {
|
||||||
|
None => {
|
||||||
|
PathBuf::from("./hosts.txt")
|
||||||
|
}
|
||||||
|
Some(actual) => {
|
||||||
|
actual
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let mut targets = PPState::build_targets_from_file(Some(file_to_check));
|
||||||
|
|
||||||
// channel to send requests to ping
|
// channel to send requests to ping
|
||||||
let (ping_response_sender, ping_response_listener) = mpsc::channel::<PingResult>();
|
let (ping_response_sender, ping_response_listener) = mpsc::channel::<PingResult>();
|
||||||
|
|||||||
Reference in New Issue
Block a user