Nmap Development mailing list archives
Re: Quick question on scripting
From: shorejsi2 () mmm com
Date: Tue, 21 Sep 2010 18:58:42 -0500
Thanks for the reply. This is almost what I want to do but 'backwards'
in a way.
In this case, I want to run a pre-existing script ( smb-os-discovery.nse
) but only when a certain pattern of ports is open and closed. I could
write my own script to check for these ports, set a registry value, and
make a modified version of smb-os-discovery.nse that has a dependency upon
my custom script. But since that involves making a custom version of a
preexisting script, I could just as well add my 'extra' dependencies to
the front of the modified copy and dispense with a separate script all
together.
Or am I missing something?
-=[ Steve ]=-
Patrick Donnelly <batrick () batbytes com>
Sent by: <nmap-dev-bounces () insecure org>
09/21/2010 10:39 AM
To
nmap-dev <nmap-dev () insecure org>
cc
Subject
Re: Quick question on scripting
On Tue, Sep 21, 2010 at 11:15 AM, <shorejsi2 () mmm com> wrote:
I've looked through the Nmap script writing documentation (probably not closely enough...) and I have one unanswered question, Is it possible to write a script which conditionally causes another script to run? What I am trying to do is trigger several deeper discovery scripts when
a
host exhibits a certain pattern of open (and closed) ports. I realize I could probably create custom versions of these existing scripts to do exactly what I want, but I was hoping there was a more elegant way.
List the dependency between the scripts [1]. Then set a flag in the registry as Ron suggested. [1] http://nmap.org/book/nse-script-format.html#nse-format-dependencies -- - Patrick Donnelly _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/ _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Quick question on scripting shorejsi2 (Sep 21)
- Re: Quick question on scripting Ron (Sep 21)
- Re: Quick question on scripting Patrick Donnelly (Sep 21)
- Re: Quick question on scripting shorejsi2 (Sep 21)
