We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c983b1 commit ac6cbedCopy full SHA for ac6cbed
1 file changed
src/scanning/file_scanner.rs
@@ -157,11 +157,15 @@ pub async fn scan_file(path: String) {
157
0.0
158
};
159
160
- let percent = format!("{:.2}", (processed_count as f64 / total_found_count as f64) * 100.0);
+ let percent = if total_found_count > 0 {
161
+ format!("{:.2}", (total_found_count as f64 / processed_count as f64) * 100.0)
162
+ } else {
163
+ "0.00".to_string()
164
+ };
165
166
logger::info(
167
format!(
- "File scan finished in {}. Found {} servers from {} targets. ({}% {}{})",
168
+ "File scan finished in {}. Found {} servers from {} targets, {}%. ({}{})",
169
format_time(elapsed_time.as_secs()).hex(DefaultColor::Highlight.hex()),
170
total_found_count.hex(DefaultColor::Highlight.hex()),
171
total_targets.hex(DefaultColor::Highlight.hex()),
0 commit comments