From 4c358b171a68157204834d533224f34f0895dba8 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 11 Feb 2011 23:09:04 +0000 Subject: [PATCH] Back-merge r22229:22234 from /nmap-releases/5.51. ------------------------------------------------------------------------ r22234 | david | 2011-02-11 14:33:33 -0800 (Fri, 11 Feb 2011) | 4 lines Add an openssl guard around the require of tns in oracle-brute and oracle-enum-users. The tns library makes a call to openssl.rand_pseudo_bytes at its top level. ------------------------------------------------------------------------ r22232 | david | 2011-02-11 14:28:18 -0800 (Fri, 11 Feb 2011) | 4 lines Put an openssl guard around the importing of ssh2 in ssh2-enum-algos.nse. Otherwise it fail in --script-updatedb when configured --without-openssl. ------------------------------------------------------------------------ r22230 | david | 2011-02-11 13:38:49 -0800 (Fri, 11 Feb 2011) | 3 lines Allow whitespace at the end of the go_to_host pattern. On Windows, there's a '\r' at the end of the string, so the pattern didn't match. --- CHANGELOG | 4 ++++ scripts/oracle-brute.nse | 12 ++++++++++-- scripts/oracle-enum-users.nse | 12 ++++++++++-- scripts/ssh2-enum-algos.nse | 10 +++++++++- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b0e16f49e..1d857f550 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ # Nmap Changelog ($Id$); -*-text-*- +o [Zenmap] Selecting one of the scan targets in the left pane is + supposed to jump to that host in the Nmap Output in the right pane + (but it wasn't). Brian Krebs reported this bug. [David] + o The -V and --version options now show the platform Nmap was compiled on, which features are compiled in, and the version numbers of libraries it is linked against. [Ambarisha B., David] diff --git a/scripts/oracle-brute.nse b/scripts/oracle-brute.nse index 7500b9941..49b0f613a 100644 --- a/scripts/oracle-brute.nse +++ b/scripts/oracle-brute.nse @@ -37,7 +37,15 @@ categories = {"intrusive", "auth"} require 'shortport' require 'brute' -require 'tns' +if pcall(require,"openssl") then + require("tns") +else + portrule = function() return false end + action = function() end + stdnse.print_debug( 3, "Skipping %s script because OpenSSL is missing.", + SCRIPT_NAME) + return; +end portrule = shortport.port_or_service(1521, "oracle-tns", "tcp", "open") @@ -134,4 +142,4 @@ action = function(host, port) status, result = engine:start() return result -end \ No newline at end of file +end diff --git a/scripts/oracle-enum-users.nse b/scripts/oracle-enum-users.nse index 87804847d..a1a7b6b99 100644 --- a/scripts/oracle-enum-users.nse +++ b/scripts/oracle-enum-users.nse @@ -33,8 +33,16 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html" categories = {"intrusive", "auth"} require 'shortport' -require 'tns' require 'unpwdb' +if pcall(require,"openssl") then + require("tns") +else + portrule = function() return false end + action = function() end + stdnse.print_debug( 3, "Skipping %s script because OpenSSL is missing.", + SCRIPT_NAME) + return; +end portrule = shortport.port_or_service(1521, 'oracle-tns' ) @@ -156,4 +164,4 @@ action = function( host, port ) end return stdnse.format_output(true, result) -end \ No newline at end of file +end diff --git a/scripts/ssh2-enum-algos.nse b/scripts/ssh2-enum-algos.nse index 66f1ec2f7..f1f3d9111 100644 --- a/scripts/ssh2-enum-algos.nse +++ b/scripts/ssh2-enum-algos.nse @@ -57,7 +57,15 @@ categories = {"safe", "discovery"} require "shortport" require "stdnse" -require "ssh2" +if pcall(require,"openssl") then + require("ssh2") +else + portrule = function() return false end + action = function() end + stdnse.print_debug( 3, "Skipping %s script because OpenSSL is missing.", + SCRIPT_NAME) + return; +end portrule = shortport.port_or_service(22, "ssh")