Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: Call for testing: --lua-exec in Ncat feature (*nix only at the moment)
From: David Fifield <david () bamsoftware com>
Date: Sun, 30 Jun 2013 19:06:37 -0700

On Fri, Jun 21, 2013 at 06:20:54PM +0200, Jacek Wielemborek wrote:
svn co https://svn.nmap.org/nmap-exp/d33tah/ncat-lua && \
cd ncat-lua
./configure
make

Now, let's try it out. We're first write a script that asks for your name
and says hello to you. Write the following lines into a greet.lua file:

io.stdout:write("Please enter your name: ")
io.stdout:flush() --if we don't use print(), we need to flush
name = io.stdin:read("*line")
print(string.format("Hello, %s! And goodbye!", name))

Once you you created that file, let's run a service powered by this script
on a TCP port 31337 and connect to it:

# ncat --lua-exec scripts/greeter.lua -l -p 31337
# ncat localhost 31337
Please enter your name:

Now you can write your name (or anything else) and see it being repeated.
After that, the script terminates and the server shuts down (you can change
that using --keep-open, or -k command-line switch).

I'd like to add that this works for Windows too now, and we hope to
merge the new feature soon.

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


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault