Nmap Development mailing list archives

[NSE] SSLv2-support script portrule bugfix


From: Sven Klemm <sven () c3d2 de>
Date: Sun, 13 Jan 2008 05:13:42 +0100

The portrule for the SSLv2-support script does not trigger for
services except for https I changed the portrule to trigger on
https,imaps, pop3s and their numeric ports or any service tunneled
through ssl.

Cheers,
Sven

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

Index: SSLv2-support.nse
===================================================================
--- SSLv2-support.nse   (revision 6682)
+++ SSLv2-support.nse   (working copy)
@@ -7,8 +7,12 @@
 
 require "shortport"
 
-portrule = shortport.port_or_service(443, {"ssl/http", "ssl", "https"})
+local portfunction = shortport.port_or_service({443,993,995},{'https','imaps','pop3s'})
 
+portrule = function( host, port )
+  return portfunction( host, port ) or port.version.service_tunnel == 'ssl'
+end
+
 hex2dec = function(hex)
 
        local byte1, byte2;

Attachment: signature.asc
Description: OpenPGP digital signature


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

Current thread: