From c8fb3889e68f274eae97489ce007d31a9fa41065 Mon Sep 17 00:00:00 2001 From: tomsellers Date: Wed, 16 Feb 2011 00:13:38 +0000 Subject: [PATCH] Addressed a condition in db2-das-info.nse where the script would crash if the DB2 DAS service had discovery mode disabled. While the service would be listening, the data would be in an unexpected format. This caused the script to crash at line 412 when it tried to extract the server profile from the DB2 response (db2response.info variable). I will likely tweak the hard setting of the ports in the block that follows after I perform more testing to verify that it behaves as expected - Tom --- scripts/db2-das-info.nse | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/db2-das-info.nse b/scripts/db2-das-info.nse index 15af2b7ea..45688ad53 100644 --- a/scripts/db2-das-info.nse +++ b/scripts/db2-das-info.nse @@ -406,8 +406,12 @@ action = function(host, port) if current_count < new_count then port.version.version = server_version end - - if db2response.info then + + local result = false + + local db2profile = extract_server_profile( db2response.info ) + + if (db2profile ~= nil ) then result = "DB2 Administration Server Settings\r\n" result = result .. extract_server_profile( db2response.info )