mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2026-10-24 08:02:12 +00:00
Added pause - resume instructions on console
This commit is contained in:
parent
21b6d17e60
commit
d1cfdb3d72
3 changed files with 3 additions and 3 deletions
|
|
@ -83,7 +83,7 @@ fn main() {
|
|||
let status_pair3 = status_pair1.clone();
|
||||
|
||||
println!("\n\tParsing packets...");
|
||||
println!("\tUpdating the file '{}' every {} seconds\n", output_file, interval);
|
||||
println!("\tUpdating the file '{}' every {} seconds\nPress 'p' to pause, ESC to exit.\n", output_file, interval);
|
||||
|
||||
thread::spawn(move || {
|
||||
sleep_and_write_report_loop(lowest_port, highest_port, interval, min_packets,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ pub fn sleep_and_write_report_loop(lowest_port: u16, highest_port: u16, interval
|
|||
|
||||
for (key, val) in sorted_vec.iter() {
|
||||
if val.transmitted_packets + val.received_packets >= min_packets {
|
||||
write!(output, "Address: {}:{}\n{}\n\n", key.address1, key.port1, val).expect("Error writing output file\n");
|
||||
write!(output, "Address: {}:{}\n{}\n\n", key.address, key.port, val).expect("Error writing output file\n");
|
||||
}
|
||||
}
|
||||
println!("\tReport updated ({})",times_report_updated);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\target\debug\packet_sniffer.exe: C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\address_port.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\command_line_options.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\main.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\parse_packets_functions.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\report_info.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\write_report_functions.rs
|
||||
C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\target\debug\packet_sniffer.exe: C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\address_port.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\args.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\main.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\report_info.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\thread_parse_packets_functions.rs C:\Users\canep\CLionProjects\pdsproject\packet_sniffer\src\thread_write_report_functions.rs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue