fix: data races with getservent
feature: time elapsed in the print
This commit is contained in:
@ -68,7 +68,6 @@ static void print_port_state(uint16_t port, e_scantype type,
|
||||
|
||||
void print_host_results(const struct scan *general, double scan_time)
|
||||
{
|
||||
printf("Scan took %lf secs\n", scan_time);
|
||||
printf("IP address: %s\n", general->dest_addr);
|
||||
printf("Opened ports:\n");
|
||||
for (uint16_t port = general->port_start; port < general->port_end;
|
||||
@ -87,4 +86,5 @@ void print_host_results(const struct scan *general, double scan_time)
|
||||
if (!is_port_opened(response->states, general->type))
|
||||
print_port_state(port, general->type, response);
|
||||
}
|
||||
printf("\nScan took %lf secs\n", scan_time);
|
||||
}
|
||||
|
Reference in New Issue
Block a user