Nmap Development mailing list archives

Error with date format string in nselib/rcp.lua


From: Alex Weber <alexwebr () gmail com>
Date: Wed, 15 May 2013 20:53:52 -0400

Hey list,

I got this error running the nfs-ls.nse script from a fresh build of r30896
on Debian 7:

NSE: nfs-ls against 172.26.23.121:111 threw an error!
/home/aweber/nmap/nselib/rpc.lua:3212: bad argument #1 to 'date' (invalid
conversion specifier '%F %H:%M')

The format specifier "%F" seems to work in Lua 5.1.5, but is invalid in Lua
5.2.1. I cannot find any documentation to back this up, but testing the
expression with system Lua 5.1 works and throws an error in system Lua 5.2.

From "man 1 date", "%F" is the same as "%Y-%m-%d", so the attached patch
just substitutes that, which Lua 5.2 accepts as valid.

-Alex Weber

Attachment: rpc.lua.diff
Description:

_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: