PATH:
usr
/
share
/
nmap
/
nselib
--- -- Buffered network I/O helper functions. -- -- The functions in this module can be used for delimiting data received by the -- <code>nmap.receive_buf</code> function in the Network I/O API (which see). -- @copyright Same as Nmap--See http://nmap.org/book/man-legal.html local pcre = require "pcre" local stdnse = require "stdnse" _ENV = stdnse.module("match", stdnse.seeall) --various functions for use with nse's nsock:receive_buf - function -- e.g. -- sock:receive_buf(regex("myregexpattern")) - does a match using pcre- regular- -- - expressions -- sock:receive_buf(numbytes(80)) - is the buffered version of -- sock:receive_bytes(80) - i.e. it returns -- exactly 80 bytes and no more --- Return a function that allows delimiting with a regular expression. -- -- This function is a wrapper around <code>pcre.exec</code>. Its purpose is to -- give script developers the ability to use regular expressions for delimiting -- instead of Lua's string patterns. -- @param pattern The regex. -- @usage sock:receive_buf(match.regex("myregexpattern")) -- @see nmap.receive_buf -- @see pcre.exec regex = function(pattern) local r = pcre.new(pattern, 0,"C") return function(buf) local s,e = r:exec(buf, 0,0); return s,e end end --- Return a function that allows delimiting at a certain number of bytes. -- -- This function can be used to get a buffered version of -- <code>sock:receive_bytes(n)</code> in case a script requires more than one -- fixed-size chunk, as the unbuffered version may return more bytes than -- requested and thus would require you to do the parsing on your own. -- @param num Number of bytes. -- @usage sock:receive_buf(match.numbytes(80)) -- @see nmap.receive_buf numbytes = function(num) local n = num return function(buf) if(#buf >=n) then return n, n end return nil end end return _ENV;
[-] iscsi.lua
[edit]
[-] httpspider.lua
[edit]
[-] rmi.lua
[edit]
[-] socks.lua
[edit]
[-] dhcp6.lua
[edit]
[-] sasl.lua
[edit]
[-] drda.lua
[edit]
[+]
data
[-] dhcp.lua
[edit]
[-] omp2.lua
[edit]
[-] ospf.lua
[edit]
[-] ipp.lua
[edit]
[-] pop3.lua
[edit]
[-] netbios.lua
[edit]
[-] pgsql.lua
[edit]
[-] packet.lua
[edit]
[-] rpc.lua
[edit]
[-] xdmcp.lua
[edit]
[-] msrpc.lua
[edit]
[+]
..
[-] eigrp.lua
[edit]
[-] giop.lua
[edit]
[-] afp.lua
[edit]
[-] bjnp.lua
[edit]
[-] match.lua
[edit]
[-] iax2.lua
[edit]
[-] smtp.lua
[edit]
[-] msrpctypes.lua
[edit]
[-] cvs.lua
[edit]
[-] natpmp.lua
[edit]
[-] bitcoin.lua
[edit]
[-] snmp.lua
[edit]
[-] rsync.lua
[edit]
[-] mssql.lua
[edit]
[-] base64.lua
[edit]
[-] ncp.lua
[edit]
[-] base32.lua
[edit]
[-] sip.lua
[edit]
[-] http.lua
[edit]
[-] asn1.lua
[edit]
[-] stun.lua
[edit]
[-] citrixxml.lua
[edit]
[-] nrpc.lua
[edit]
[-] proxy.lua
[edit]
[-] pppoe.lua
[edit]
[-] amqp.lua
[edit]
[-] dns.lua
[edit]
[-] informix.lua
[edit]
[-] tftp.lua
[edit]
[-] sslcert.lua
[edit]
[-] strbuf.lua
[edit]
[-] unpwdb.lua
[edit]
[-] strict.lua
[edit]
[-] vulns.lua
[edit]
[-] jdwp.lua
[edit]
[-] stdnse.lua
[edit]
[-] dnssd.lua
[edit]
[-] mysql.lua
[edit]
[-] rdp.lua
[edit]
[-] mongodb.lua
[edit]
[-] ndmp.lua
[edit]
[-] isns.lua
[edit]
[-] ldap.lua
[edit]
[-] creds.lua
[edit]
[-] tab.lua
[edit]
[-] ftp.lua
[edit]
[-] brute.lua
[edit]
[-] comm.lua
[edit]
[-] ipOps.lua
[edit]
[-] mobileme.lua
[edit]
[-] target.lua
[edit]
[-] rpcap.lua
[edit]
[-] eap.lua
[edit]
[-] cassandra.lua
[edit]
[-] ssh1.lua
[edit]
[-] url.lua
[edit]
[-] datafiles.lua
[edit]
[-] ajp.lua
[edit]
[-] vuzedht.lua
[edit]
[-] nsedebug.lua
[edit]
[-] rtsp.lua
[edit]
[-] shortport.lua
[edit]
[-] bittorrent.lua
[edit]
[-] ssh2.lua
[edit]
[-] msrpcperformance.lua
[edit]
[-] listop.lua
[edit]
[-] dnsbl.lua
[edit]
[-] json.lua
[edit]
[-] redis.lua
[edit]
[-] wsdd.lua
[edit]
[-] tns.lua
[edit]
[-] ike.lua
[edit]
[-] gps.lua
[edit]
[-] versant.lua
[edit]
[-] imap.lua
[edit]
[-] smb.lua
[edit]
[-] smbauth.lua
[edit]
[-] xmpp.lua
[edit]
[-] upnp.lua
[edit]
[-] membase.lua
[edit]
[-] vnc.lua
[edit]
[-] srvloc.lua
[edit]