Dailydave mailing list archives
Re: Today's Windows Trivia Event
From: Dave Aitel <dave () immunitysec com>
Date: Wed, 30 Mar 2005 12:47:59 -0500
The reason I don't like timeouts is because I don't know how far away the host is to begin with. It might be 2 seconds away, which makes any reasonably timeout moot. So Neil wins the shell! :>
-dave Chris Anley wrote:
Another solution; use select(), and a non-blocking socket... i = 1; ioctlsocket( s, FIONBIO, (unsigned long *)&i );Then implement the timeout of your choice with select(). If you're banner grabbing, you might want tosetsockopt( s, SOL_SOCKET, SO_RCVTIMEO, ...to set a recieve timeout. Also, you might want calls to block after the connect, so you can set the socket to blocking again withi = 0; ioctlsocket( s, FIONBIO, (unsigned long *)&i ); Probably less tidy than you wanted, but that should work. -chris. Dave Aitel wrote:Conundrum: setsockopt(sock,SO_DONOTSUCK);
_______________________________________________ Dailydave mailing list Dailydave () lists immunitysec com https://lists.immunitysec.com/mailman/listinfo/dailydave
Current thread:
- Today's Windows Trivia Event Dave Aitel (Mar 30)
- Re: Today's Windows Trivia Event Chris Anley (Mar 30)
- Re: Today's Windows Trivia Event Dave Aitel (Mar 30)
- Re: Today's Windows Trivia Event Nexus (Mar 30)
- Re: Today's Windows Trivia Event dan (Mar 30)
- <Possible follow-ups>
- Re: Today's Windows Trivia Event ndesai01 (Mar 30)
- Re: Today's Windows Trivia Event full-disclosure (Mar 30)
- RE: Today's Windows Trivia Event James Jones (Mar 30)
- Re: Today's Windows Trivia Event Chris Anley (Mar 30)