Library ftp
FTP functions.
Copyright© Same as Nmap--See http://nmap.org/book/man-legal.html
Source: http://nmap.org/svn/nselib/ftp.lua
Functions
| connect (host, port, opts) |
Connects to the FTP server based on the provided options. |
| read_reply (buffer) |
Read an FTP reply and return the numeric code and the message. See RFC 959, section 4.2. |
Functions
- connect (host, port, opts)
-
Connects to the FTP server based on the provided options.
Parameters
- host: The host table
- port: The port table
- opts: The connection option table, possible options: timeout: generic timeout value recv_before: receive data before returning
Return values:
- socket The socket descriptor, or nil on errors
- response The response received on success and when the recv_before is set, or the error message on failures.
- read_reply (buffer)
-
Read an FTP reply and return the numeric code and the message. See RFC 959, section 4.2.
Parameters
-
buffer:
should have been created with
stdnse.make_buffer(socket, "\r?\n").
Return values:
- numeric code or
nil. - text reply or error message.
-
buffer:
should have been created with


