Nmap Development mailing list archives
Re: Win32 port
From: Kevin³ Davis <kevin.davis () mindless com>
Date: Wed, 27 Feb 2002 06:28:43 -0500
A while back I posted a problem I had with nmap crashing on Windows boxes -
sometimes. Andy Lutomirski posted a patch that fixed things for me.
Hopefully this has made it into the developer's hands and will be
implemented in the next release. See below for the fix:
Change readip_rawrecv in rawrecv.c to this:
char *rawrecv_readip(pcap_t *pd, unsigned int *len, long to_usec)
{
int rcvlen;
DWORD time1, time2;
fd_set fds;
TIMEVAL tv;
if(-2 != (long)pd)
fatal("rawrecv_readip: called with non-rawrecv handle\n");
begin:
// Note: I could use SO_RCVTIMEO but I don't trust it...
time1 = GetTickCount();
FD_ZERO(&fds);
FD_SET(s, &fds);
tv.tv_usec = to_usec % 1000000;
tv.tv_sec = to_usec / 1000000;
if(0 == select(0, &fds, 0, 0, &tv))
{
if(len) *len = 0;
return 0;
}
rcvlen = recv(s, buf, sizeof(buf), 0);
time2 = GetTickCount() + 10;
if(rcvlen > 0)
{
if(rcvlen >= sizeof(struct ip) && filter(buf, rcvlen))
{
if(len) *len = rcvlen;
return buf;
}
else
{
to_usec -= 1000 * (time2 - time1);
if(to_usec < 0)
{
if(len) *len = 0;
return 0;
}
goto begin;
}
}
else
{
DWORD err = WSAGetLastError();
if(err != WSAETIMEDOUT && err != WSAEWOULDBLOCK)
fatal("rawrecv: recv failed (%lu)\n", err);
if(len) *len = 0;
return 0;
}
}
---------------------------------------
Kevin³ Davis
What could possibly go wrong?
kevin.davis () mindless com
----- Original Message -----
From: "Stou Sandalski" <tangui () cell2000 net>
To: "'Paul Ellison'" <philo () mmcable com>; <nmap-dev () insecure org>
Sent: Wednesday, February 27, 2002 1:54 AM
Subject: RE: Win32 port
Because of some people requesting a XP build of nmap I had compiled it with .NET and upped it here a while back: http://cell2000.net/~users/tangui/nmap-2.54beta30(binary).zip It works on my laptop with XP but for some reason cores on my primary desktop, I will test it on a few other systems soon. Stou-----Original Message----- From: Paul Ellison [mailto:philo () mmcable com] Sent: Tuesday, February 26, 2002 10:31 PM To: nmap-dev () insecure org Subject: Win32 port I realize I asked this same question a little over a week ago but have since crashed and reload and lost misc things like email. Back now and needtoask the same question please! :) Does anyone happen to have or know where one might get the latest porttowindows for nmap? I would be most appreciative of any ideas to go. Thanks! Paul --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.325 / Virus Database: 182 - Release Date: 2.20.2002 --------------------------------------------------------------------- For help using this (nmap-dev) mailing list, send a blank email to nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).--------------------------------------------------------------------- For help using this (nmap-dev) mailing list, send a blank email to nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).
--------------------------------------------------------------------- For help using this (nmap-dev) mailing list, send a blank email to nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).
Current thread:
- no buffer space Terry Davis (Feb 26)
- Win32 port Paul Ellison (Feb 26)
- Re: Win32 port Terry Davis (Feb 26)
- RE: Win32 port Stou Sandalski (Feb 26)
- Re: Win32 port Kevin³ Davis (Feb 27)
- Re: Win32 port Jeff (Feb 27)
- Re: Win32 port Kevin³ Davis (Feb 27)
- Re: Win32 port Jeff (Feb 28)
- Win32 port Paul Ellison (Feb 26)
