diff --git a/arp_scan.c b/arp_scan.c index c4b2c8f..f0e890c 100644 --- a/arp_scan.c +++ b/arp_scan.c @@ -158,11 +158,18 @@ int main(int argc, char **argv) perror("[FAIL] inet_ntop()"); exit(EXIT_FAILURE); } - printf("[%s]\n", ip_string); + send_arp_request(sockfd, ifindex, ipaddr, macaddr, target_ip); + + struct ether_arp *result = malloc(sizeof(struct ether_arp)); + int isalive = listen_arp_frame(sockfd, result); + if (isalive == 0) { + printf("Host %s is alive!\n", ip_string); + } ++ip_counter; } - + + return 0; }