Hej !
I had some problems with OS recognition via nmap, nmap correctly recognise
it but after on the web you do not have correct information. What needs to
be changed:
You swap this two parts of the code
_____________________ Lines 1404-1420 ___________________________________
/* Read remaining data (if any) */
while(1) {
FD_ZERO(&mask);
FD_SET(sockFd, &mask);
if(select(sockFd+1, &mask, 0, 0, &wait_time) == 0) {
break; /* Timeout */
}
if(fgets(line, 383, fd) == NULL)
break;
/* else printf("Garbage: '%s'\n", line); */
}
pclose(fd);
________________________________________________________________
_______________________ Lines 1421-1429 ________________________
memset(staticOsName, 0, sizeof(staticOsName));
if(found) {
#ifdef DEBUG
traceEvent(TRACE_INFO, "OS is: '%s'\n", operatingSystem);
#endif
len = strlen(operatingSystem);
strncpy(staticOsName, operatingSystem, len-1);
}
________________________________________________________________
And everything will work properly. Have fun !
:x
Best regards
Pawel
---
Pawel Wiatr
IT-universitetet/KTH-Kista
Institutionen f�r Teleinformatik
Isafjordsgatan 22, hissB, plan5
Electrum 204
164 40 Kista
Tel: 08-7521496
Fax: 08-7511793
_______________________________________________________________________________
You do not really understand something unless you can explain it to your
grandmother.
Two things are infinite: the universe and human stupidity, but I am not
sure about the universe.
A. Einstein
_______________________________________________________________________________