Nmap Development mailing list archives

Ncat-Lua idea: --lua-eval for Lua one-liners


From: Jacek Wielemborek <wielemborekj1 () gmail com>
Date: Wed, 19 Jun 2013 23:52:21 +0200

Hi guys,

I have an idea for an Ncat extension that would work as an addition to
--lua-exec. The feature I'm speaking of is --lua-eval, which would
allow to run simple Lua one-line scripts directly from the
command-line, in contrast to --lua-exec, which requires a file to be
created in order to be executed. The invocation would look like this:

ncat -l -p 13 --lua-eval 'print(os.date())'

...which implements the RFC 867 daytime service. For convenience
reasons, --lua-eachline could also be implemented, which would wrap
the code in a fashion similar to „perl -n” invocation, like this:

     while true do

        line = io.stdin:read("*line")

        if line == nil then
            break
        end

        --THE CODE GOES HERE

    end

Since the feature is intended for sketching pretty short scripts (as
it would most likely be daunting to write develop something longer
this way), there are doubts that it would actually be useful enough to
justify the cost of design, development, debugging, documenting and
testing it.

Thus the question – do you like the idea? Do you think you would find
any application for it?

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


Current thread: