File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,11 +130,16 @@ pub async fn crawl(gen_config: IpGenerator) {
130130 } else {
131131 0.0
132132 } ;
133- let percent = format ! ( "{:.2}" , ( processed_count as f64 / total_found_count as f64 ) * 100.0 ) ;
133+
134+ let percent = if total_found_count > 0 {
135+ format ! ( "{:.2}" , ( total_found_count as f64 / processed_count as f64 ) * 100.0 )
136+ } else {
137+ "0.00" . to_string ( )
138+ } ;
134139
135140 logger:: info (
136141 format ! (
137- "Crawl iteration finished in {}. Found {} servers from {} targets. ( {}% {}{})" ,
142+ "Crawl iteration finished in {}. Found {} servers from {} targets, {}%. ( {}{})" ,
138143 format_time( elapsed_time. as_secs( ) ) . hex( DefaultColor :: Highlight . hex( ) ) ,
139144 total_found_count. hex( DefaultColor :: Highlight . hex( ) ) ,
140145 total_targets. hex( DefaultColor :: Highlight . hex( ) ) ,
You can’t perform that action at this time.
0 commit comments