From a2f02dc3766c0dfec32e78884e6f3afb39b74e9e Mon Sep 17 00:00:00 2001 From: randomstr1ng Date: Tue, 2 Sep 2025 10:04:46 +0200 Subject: [PATCH 1/2] fix output issue off sap_router_portscanner module --- modules/auxiliary/scanner/sap/sap_router_portscanner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/auxiliary/scanner/sap/sap_router_portscanner.rb b/modules/auxiliary/scanner/sap/sap_router_portscanner.rb index e6e4e101c912c..9c0aab300853b 100644 --- a/modules/auxiliary/scanner/sap/sap_router_portscanner.rb +++ b/modules/auxiliary/scanner/sap/sap_router_portscanner.rb @@ -423,6 +423,6 @@ def run_host(ip) end print_warning('Warning: Service info could be inaccurate') - print(tbl) + print_line(tbl.to_s) end end From 911f8e4f6ef14516bf12a5e768082f1df69f1cac Mon Sep 17 00:00:00 2001 From: randomstr1ng Date: Sun, 28 Dec 2025 09:57:39 +0100 Subject: [PATCH 2/2] fix !gsub output error --- modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb | 2 +- .../auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb | 2 +- modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb | 2 +- modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb | 2 +- modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb index 6e9de4fd5ad75..11e0456516790 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb @@ -127,7 +127,7 @@ def exec(ip, fields) 0.upto(output.length - 1) do |i| saptbl << [output[i]] end - print(saptbl) + print(saptbl.to_s) this_service = report_service( host: ip, port: rport, diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb index a77cc7ca5f107..cd5efe7bc6c67 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb @@ -113,7 +113,7 @@ def run_host(ip) for i in 0..output.length - 1 saptbl << [output[i]] end - print(saptbl) + print(saptbl.to_s) else print_error("[SAP] #{ip}:#{rport} - Unknown error") return diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb index e13e38eab51a1..db0883ae208b6 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb @@ -111,7 +111,7 @@ def run_host(ip) for i in 0..output.length - 1 saptbl << [output[i]] end - print(saptbl) + print(saptbl.to_s) else print_error("[SAP] #{ip}:#{rport} - Unknown error") end diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb index b6ca88f58f5c4..daaffe8cfb27d 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb @@ -184,6 +184,6 @@ def run_host(ip) end # output table - print(@saptbl) + print(@saptbl.to_s) end end diff --git a/modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb b/modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb index 7ffbe7683e7d8..d8e659ea2247d 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb @@ -102,7 +102,7 @@ def run_host(ip) saptbl << [ 'DB version', kern_dblib ] saptbl << [ 'SAP patch level', kern_patchlevel ] saptbl << [ 'SAP Version', kern_rel ] - print(saptbl) + print(saptbl.to_s) report_note( host: ip,