Movatterモバイル変換


[0]ホーム

URL:


Home page logo
nmap-dev logo

Nmap Developmentmailing list archives

PreviousBy DateNext
PreviousBy ThreadNext

Re: Nsock new engines


From: Henri Doreau <henri.doreau () gmail com>
Date: Thu, 25 Oct 2012 21:02:49 +0200

2012/10/25 Rob Nicholls <robert () robnicholls co uk>:
On 25.10.2012 11:52, Henri Doreau wrote:
Hi,thanks for the feedback. I'll try to troubleshoot that. Which commandare you using? You should be able to force the use of a given engineusing the "--nsock-engine=select" parameter. Could you test it (serverand client side)?
I hadn't thought to add the extra parameter, sorry I didn't realise thisfirst. When I force the use of "select" it works fine; when I use "poll" itdoesn't work:C:\Users\Robert>ncat -v xxx.xxxxxx.xxx 80 --nsock-engine=selectNcat: Version 6.02 (http://nmap.org/ncat )Ncat: Connected to xxx.xxx.xxx.xxx:80.GET / HTTP/1.0Host: xxx.xxxxxx.xxxHTTP/1.1 302 RedirectContent-Type: text/html; charset=UTF-8Location:https://xxx.xxxxxx.xxx/Server: Microsoft-IIS/7.0X-FRAME-OPTIONS: SAMEORIGINDate: Thu, 25 Oct 2012 13:16:15 GMTConnection: closeContent-Length: 153<head><title>Document Moved</title></head><body><h1>Object Moved</h1>This document may be found <aHREF="https://xxx.xxxxxx.xxx/";>here</a></body>Ncat: 44 bytes sent, 393 bytesreceived in 9.69 seconds.C:\Users\Robert>ncat -v xxx.xxxxxx.xxx 80 --nsock-engine=pollNcat: Version 6.02 (http://nmap.org/ncat )Ncat: Connected to xxx.xxx.xxx.xxx:80.^CBoth engines seem to work fine when listening (used telnet and Ncat withselect to send to the server):C:\Users\Robert>ncat -lk 8080 --nsock-engine=pollhelloworld^CC:\Users\Robert>ncat -lk 8080 --nsock-engine=selectpingpong^CRob
Thanks Rob,it looks like WSAPoll isn't able to deal with stdin, even though Ican't find anything in the WSAPoll() documentation that would explainthis difference of behavior with select().Does anyone know a way to do it? I unfortunately don't, and couldn'tfind anything that would work for both stdin options (tty, pipes,files) and sockets. Since only ncat should be affected there, maybethe patch attached (untested) would be an acceptable fix? It enforcesthe use of the select engine on windows when stdin is a tty. Could youplease give it a try? (also with piping something, like echo, to ncat,and redirecting a regular file to ncat' stdin).I dislike these hidden and forced uses of the select engine in ncatbut I really don't see any other acceptable option. Disabling windowscompatibility in the poll engine would be doable too, but at the endof the day the restrictions would be the same in ncat (select only)and nmap/nping couldn't benefit the advantages of poll...Regards-- Henri

Attachment:ncat_win_use_select.diff
Description:

_______________________________________________Sent through the nmap-dev mailing listhttp://cgi.insecure.org/mailman/listinfo/nmap-devArchived athttp://seclists.org/nmap-dev/

PreviousBy DateNext
PreviousBy ThreadNext

Current thread:


[8]ページ先頭

©2009-2025 Movatter.jp