From 7ebbccbbac6374f44fa43602de8605ca0b7d3014 Mon Sep 17 00:00:00 2001 From: Dimitri Lozeve Date: Fri, 3 Jun 2016 16:45:30 +0200 Subject: [PATCH] Bugfix: scan returned wrong IP addresses --- arp_scan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arp_scan.c b/arp_scan.c index f0e890c..729bb45 100644 --- a/arp_scan.c +++ b/arp_scan.c @@ -164,7 +164,9 @@ int main(int argc, char **argv) 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); + printf("Host %d.%d.%d.%d is alive!\n", + result->arp_spa[0],result->arp_spa[1], + result->arp_spa[2],result->arp_spa[3]); } ++ip_counter;