Nmap Development mailing list archives

Re: [NSE][PATCH] only show script errors in verbose mode


From: Sven Klemm <sven () c3d2 de>
Date: Wed, 24 Sep 2008 10:03:07 +0200

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

Fyodor wrote:
|> I think this is an acceptable solution, though of course others are
|> welcome to share their opinion. I do think that this needs to be
|> documented in scripting.xml, that require errors are a special case of
|> errors that are silently ignored.
|
| Hi David.  I agree that this patch looks promising.  Though I have a
| concern which as expressed in a post by Diman last night related to a
| different proposed solution.  If someone tries to run a script, and
| the required libraries can't be found (like bit, or shortport, or
| maybe a more specific one like pop3 related to their script), they
| probably won't notice the problem.  Ignoring errors is a bit
| dangerous, so I think we should tailor the ignore rule pretty closely.
|
| Yesterday Sven checked in some code to his nmap-exp which modified
| SSH-hostkey like this:
|
| -portrule = shortport.port_or_service(22, "ssh")
| +if nmap.have_ssl() then
| +  require("openssl")
| +  portrule = shortport.port_or_service(22, "ssh")
| +else
| +  portrule = function() return false end
| +end
|
| I think this approach warrants some consideration since it is
| specifically targetted, and does not rely on special case "magic"
| behavior.  On the other hand, it puts more of a burden on script
| writers than Patrick's patch.  So I'm fine with whatever solution
| David decides on.  I agree that the ignore-require-errors approach
| needs to be documented if we use that.

I am wondering whether we need to suppress those error messages at
all. Since --script-updatedb now skips scripts it cannot load the user
can get rid of those error messages by regenerating script.db.

Cheers,
Sven

- --
Sven Klemm
http://cthulhu.c3d2.de/~sven/

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

iEYEARECAAYFAkjZ9DsACgkQevlgTHEIT4a5JgCfcBGTOhEfuNyZc+bHFiw74RU6
HxsAnjPghVbpDNH9+UniOpIQQqDTp5SS
=xpyk
-----END PGP SIGNATURE-----

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


Current thread: