Nmap Development mailing list archives
Re: nmap socket bind to the udp port
From: Patrik Karlsson <patrik () cqure net>
Date: Thu, 15 Mar 2012 22:04:08 +0100
On Thu, Mar 15, 2012 at 10:45 AM, SAI LAKSHMI Bhavana <oslbhavana () gmail com>wrote:
On Wed, Mar 14, 2012 at 10:25 PM, idtjoe1 <josephriz () gmail com> wrote:Hello Sai, Can you tell us the usage of stdnse.make_buffer() function vs socket:receive_lines(1). When to use one vs another? Is function stdnse.make_buffer documented anywhere? Your help is appreciated.Hello, If the data contains more than 1 line In stdnse.make_buffer() only a piece of seperated data would be returned where the data need not be seperated only by "\n". But in socket:recieve_lines(1) all the data would be read . Here 1 is the minimum number of lines to be read. Here is the link for the code of make_buffer() http://nmap.org/svn/nselib/stdnse. _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Here are a few different ways of reading data from a socket: receive() - return all currently available data receive_lines(n) - returns at least n lines receive_bytes(n) - returns at least n bytes receive_buf(pattern, true) - returns data up to and including the pattern receive_buf(match.numbytes(n), true) - returns exactly n bytes for more information consult the nsedoc at http://nmap.org/nsedoc/lib/nmap.html Cheers, Patrik -- Patrik Karlsson http://www.cqure.net http://twitter.com/nevdull77 _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- nmap socket bind to the udp port idtjoe1 (Mar 09)
- Re: nmap socket bind to the udp port SAI LAKSHMI Bhavana (Mar 09)
- Re: nmap socket bind to the udp port idtjoe1 (Mar 09)
- Re: nmap socket bind to the udp port Patrik Karlsson (Mar 09)
- Re: nmap socket bind to the udp port SAI LAKSHMI Bhavana (Mar 09)
- Re: nmap socket bind to the udp port idtjoe1 (Mar 14)
- Re: nmap socket bind to the udp port David Fifield (Mar 14)
- Re: nmap socket bind to the udp port idtjoe1 (Mar 14)
- Re: nmap socket bind to the udp port SAI LAKSHMI Bhavana (Mar 15)
- Re: nmap socket bind to the udp port Patrik Karlsson (Mar 15)
- Re: nmap socket bind to the udp port idtjoe1 (Mar 09)
- Re: nmap socket bind to the udp port SAI LAKSHMI Bhavana (Mar 09)