Nmap Development mailing list archives
Calling external executable using NSE script
From: "Lawrence Waterhouse" <lawrence.waterhouse () gmail com>
Date: Tue, 12 Dec 2006 13:06:07 -0500
Hi folks, Just started playing with the NSE implementation, i am using Nmap version 4.21ALPHA1 Basicly i want to test if i am able to call various external executable with NSE scripting, I made sure to include the script in my script.db: Entry{ category = "safe", filename = "./scripts//external_Test.nse" } NSE dont seem to allow me to use io.popen function ? Here is the script i am currently testing: --snip-- id = "External" description = "bleh" author = "Someone Else <foo () bar net>" license = "See nmaps COPYING for licence" categories = {"safe"} portrule = function(host, port) if port.number == 80 and port.service == "http" and port.protocol == "tcp" and port.state == "open" then return true else return false end end action = function(host, port) local result f = io.popen ("ls") result = f:read("*a") f.close() return result end --snip-- I am puzzled, thanks ! _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Calling external executable using NSE script Lawrence Waterhouse (Dec 12)
- Re: Calling external executable using NSE script Diman Todorov (Dec 12)