Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: ncat usage
From: Dave Henderson <dhenderson () digital-pipe com>
Date: Thu, 10 May 2012 19:53:32 -0400

Ok, I adjusted the script to output the verbatim information you've listed below using the same graphic file (also provided below). Afterwards, I tried again in the browser, but it still just shows the raw contents of the graphic file as part of the HTML. As a result, I tried an ncat on the ncat web server to see it's output, and as expected, I got the identical output below. What I did notice, and later verified as an issue with all requests, is that the connection never closes. As such, I think the original connection to the web server transmitting the HTML never closes so any output produced afterwards gets added right behind it as part of it (the graphics file request). This would also explain why the status bar never shows a disconnect from the web server. So... I changed the script once again to put ncat inside the infinite 'while' loop (and remove the -k parameter) so that it should basically serve the file and then stop running - only this didn't correct the problem! The connection still stays open when I ncat, the ncat web server! I've even tried doing an "echo -e '\x04'" (EOT/EOF) after the HTML is transmitted to the server, but it doesn't cause a disconnect either. Thoughts?

Thanks,
Dave


On 05/10/2012 04:15 PM, James Rogers wrote:
I got it to work on my localhost.   Evidently you have to give a HOST
tag or something similar for some sort of virtual hosting on many
servers.

ncat -C localhost 80
GET /icons/folder.gif HTTP/1.0

HTTP/1.1 200 OK
Date: Thu, 10 May 2012 20:12:32 GMT
Server: Apache/2.2.17 (Ubuntu)
Last-Modified: Sat, 20 Nov 2004 20:16:24 GMT
ETag: "c6c1d-e1-3e9564c23b600"
Accept-Ranges: bytes
Content-Length: 225
Connection: close
Content-Type: image/gif

GIF89a�����̙����f3333!�NThis art is in the public domain. Kevin
Hughes, kevinh () IE�qg<��N"4�IRaV�V���x��l<&����z�#,L��;;

On Thu, May 10, 2012 at 3:44 PM, Dave Henderson
<dhenderson () digital-pipe com>  wrote:
I tried your suggestion below, but constantly get a 404 error when trying to
get a graphic from a remote host even though I know the path and filename
are correct.  Any other thoughts?

Thanks,
Dave
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]