3 --- osfinger.c.orig 2002-07-21 02:49:32.000000000 -0400
6 #include <sys/socket.h>
7 #include <netinet/in.h>
9 +#include <arpa/inet.h>
13 @@ -71,7 +72,14 @@ osdetect(char *scanhost)
15 snprintf(osfinger, sizeof(osfinger), "GET %s%s HTTP/1.0\n\n", NETCRAFT_FINGER, scanhost);
16 send(sock, osfinger, strlen(osfinger), 0);
17 - recv(sock, headBuff, sizeof(headBuff), MSG_WAITALL);
20 + int toRead = sizeof(headBuff);
23 + while ((wasRead = recv(sock, headBuff, toRead, 0)) > 0)
27 ptr = strstr(headBuff, "running <b>");