Nmap Development mailing list archives
Re: stdnse.make_buffer(socket, "\r")
From: Patrick Donnelly <batrick () batbytes com>
Date: Mon, 29 Nov 2010 14:49:48 -0500
On Mon, Nov 29, 2010 at 1:53 PM, David Fifield <david () bamsoftware com> wrote:
On Sat, Nov 27, 2010 at 06:57:06PM +0200, Toni Ruottu wrote:hello I am trying to chat with a server that uses "\r" as a line separator. I do stdnse.make_buffer(socket, "\r") to handle buffering. The problem is that make_buffer will never return anything unless the server sends "\n". Is this considered appropriate behavior from make_buffer, or would this be considered a bug? I am asking because fixing this for each script separately would require duplicating lots of functionality available in the standard library.Probably the server is line-buffered and doesn't even send anything until it has a '\n' to send. Run your program with --script-trace to see what is going on. Also consider looking at a packet capture from tcpdump or Wireshark.
Well, stdnse.make_buffer right now does line by line reads so it seems this line should now be changed from local status, str = socket:receive_lines(1); to local status, str = socket:receive(); ? -- - Patrick Donnelly _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- stdnse.make_buffer(socket, "\r") Toni Ruottu (Nov 27)
- Re: stdnse.make_buffer(socket, "\r") David Fifield (Nov 29)
- Re: stdnse.make_buffer(socket, "\r") Patrick Donnelly (Nov 29)
- Re: stdnse.make_buffer(socket, "\r") David Fifield (Nov 29)
- Re: stdnse.make_buffer(socket, "\r") Patrick Donnelly (Nov 29)
- Re: stdnse.make_buffer(socket, "\r") Patrick Donnelly (Nov 29)
- Re: stdnse.make_buffer(socket, "\r") David Fifield (Nov 29)