Nmap Development mailing list archives

Re: [NSE] Script Pre-scanning and Post-scanning example


From: Kris Katterjohn <katterjohn () gmail com>
Date: Fri, 10 Sep 2010 00:37:22 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/11/2010 01:53 PM, Kris Katterjohn wrote:
On 08/11/2010 08:24 AM, Djalal Harouni wrote:
Hi Kris,

On 2010-08-10 19:19:41 -0500, Kris Katterjohn wrote:
* The pre-scan output is not the usual snmp-interfaces output, but rather just
a line stating how many targets were successfully added.  The prerule
functionality for this script in this patch is to add targets and so I thought
the output should pertain solely to that.
Yes, if the user runs the script scan with --script-args "newtargets"
then he wants to add targets to Nmap, however if the script argument
"newtargets" is not present, and the other necessary script arguments that
will let the script to run in the pre-scanning (prerule) phase, then
perhaps the user wants simply to see the *output* of the script in the
pre-scanning phase.


OK, that makes sense.  I wasn't thinking about it the right way: I was more
just in a mode of "cool, we can script host discovery".  prerule + target
adding just seemed to be synonymous since I only glanced at commits and emails
but hadn't followed closely (too bad for me).


I've been quite busy lately, but I finally got a chance to update this patch.

It still adds all of the interface addresses to the target queue, but the
script will also run as a prerule even if newtargets isn't specified.  Either
way the normal script output is now shown when run as a prerule, and if it
adds targets it still also tells how many were successfully added like the
previous patch.

Cheers,
Kris Katterjohn

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMicQRAAoJEEQxgFs5kUfuyegP/2tYF1WdMXo2b/ghaIPG/ttO
hk4jQHGTIlkeCOJYYh9BAbT2djmqn7MOg8y7WQGtKyuRoIHAHkGWIJYspLviFKRa
DcQvKQenpJi/+YSseaAx1DzqoeCiLtM1hFZc7Rr5rD+MFLlFFWilFiDjCNMrahyk
bhUPjsZJxjwZEiMLP/3Nq/w4R3ZsqABVyTGupnSmReuHtwoOg9sog7hH4tzU/vVY
OaTP/I+hsL/1vPlKO/60mnCs7IPXe4UVzhI5x5+kQS589IgeaZ4LR3DZ+2hrkVsU
FlzNfCGcwVp5xq1a6RqCR9U+FmlqItu13l3FHyC0T0LLUajkbwopdS6dHMgkfwjj
peLdsdcKiWuFhDKM7IQ3kJqSr7NiPIyd7X+8Q19R89lIzodRnFZ6sFk1XbnOrhin
VTJCKOcPK0FWoweFHyKaYdpitOo7Z+GmSeKS1cYBZLUiX/ParWEn+N/XsuEY0TYL
IZjWL5/PRgkliHgCvLocl4umuqY8PUQKeyjBKb2LsQw9uPRjUI1xA7FDcNyT6bDC
WEEx7wGXw9IgKYCmirdJLTZc/ZLRY44dDrfuydB/t256OTwoog+wtqkD9jzWlOA0
PVdCWMXynm82DvWp/fbkaOeVyqQDJOafy47MXXCQbO+ua4IUfSXO4vC54XEeWOgC
jNKyJn4GddzIMQBHhsoa
=zzkS
-----END PGP SIGNATURE-----

Attachment: snmp.patch
Description:

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

Current thread: