From df9b64274669582fc093ac7f860a1fa0fe361f0a Mon Sep 17 00:00:00 2001 From: g0tmi1k Date: Wed, 19 Jul 2017 11:39:15 +0100 Subject: [PATCH] More print_status -> print_good --- modules/auxiliary/admin/http/sysaid_sql_creds.rb | 2 +- modules/auxiliary/admin/mssql/mssql_findandsampledata.rb | 2 +- modules/auxiliary/admin/oracle/oracle_login.rb | 2 +- modules/auxiliary/gather/browser_info.rb | 2 +- modules/auxiliary/scanner/db2/db2_version.rb | 2 +- modules/auxiliary/scanner/db2/discovery.rb | 2 +- modules/auxiliary/scanner/discovery/udp_probe.rb | 4 ++-- modules/auxiliary/scanner/discovery/udp_sweep.rb | 2 +- modules/auxiliary/scanner/mysql/mysql_login.rb | 2 +- modules/auxiliary/scanner/oracle/oracle_hashdump.rb | 2 +- modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb | 2 +- modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb | 2 +- modules/auxiliary/scanner/portscan/tcp.rb | 2 +- modules/auxiliary/server/capture/ftp.rb | 2 +- modules/auxiliary/server/capture/http.rb | 2 +- modules/auxiliary/server/capture/mysql.rb | 4 ++-- modules/auxiliary/server/capture/pop3.rb | 2 +- modules/auxiliary/server/capture/postgresql.rb | 2 +- modules/auxiliary/server/capture/smtp.rb | 2 +- modules/auxiliary/server/openssl_heartbeat_client_memory.rb | 4 ++-- 20 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/auxiliary/admin/http/sysaid_sql_creds.rb b/modules/auxiliary/admin/http/sysaid_sql_creds.rb index 8de566eebe..c792571709 100644 --- a/modules/auxiliary/admin/http/sysaid_sql_creds.rb +++ b/modules/auxiliary/admin/http/sysaid_sql_creds.rb @@ -117,7 +117,7 @@ class MetasploitModule < Msf::Auxiliary fail_with(Failure::Unknown, 'Could not resolve database server hostname.') end - print_status("Stored SQL credentials #{username}:#{password} for #{matches.captures[2]}") + print_good("Stored SQL credentials #{username}:#{password} for #{matches.captures[2]}") return end else diff --git a/modules/auxiliary/admin/mssql/mssql_findandsampledata.rb b/modules/auxiliary/admin/mssql/mssql_findandsampledata.rb index 040294470c..54b1420503 100644 --- a/modules/auxiliary/admin/mssql/mssql_findandsampledata.rb +++ b/modules/auxiliary/admin/mssql/mssql_findandsampledata.rb @@ -448,7 +448,7 @@ class MetasploitModule < Msf::Auxiliary if (save_loot=="yes") filename= "#{datastore['RHOST']}-#{datastore['RPORT']}_sqlserver_query_results.csv" path = store_loot("mssql.data", "text/plain", datastore['RHOST'], sql_data_tbl.to_csv, filename, "SQL Server query results",this_service) - print_status("Query results have been saved to: #{path}") + print_good("Query results have been saved to: #{path}") end end diff --git a/modules/auxiliary/admin/oracle/oracle_login.rb b/modules/auxiliary/admin/oracle/oracle_login.rb index ca1d4ddb67..d954e77494 100644 --- a/modules/auxiliary/admin/oracle/oracle_login.rb +++ b/modules/auxiliary/admin/oracle/oracle_login.rb @@ -87,7 +87,7 @@ class MetasploitModule < Msf::Auxiliary user: "#{datastore['SID']}/#{datastore['DBUSER']}", password: datastore['DBPASS'] ) - print_status("Found user/pass of: #{datastore['DBUSER']}/#{datastore['DBPASS']} on #{datastore['RHOST']} with sid #{datastore['SID']}") + print_good("Found user/pass of: #{datastore['DBUSER']}/#{datastore['DBPASS']} on #{datastore['RHOST']} with sid #{datastore['SID']}") end end end diff --git a/modules/auxiliary/gather/browser_info.rb b/modules/auxiliary/gather/browser_info.rb index f0add1bf09..24fe6537a9 100644 --- a/modules/auxiliary/gather/browser_info.rb +++ b/modules/auxiliary/gather/browser_info.rb @@ -60,7 +60,7 @@ class MetasploitModule < Msf::Auxiliary end def print_target_info(cli, target_info) - print_status("#{cli.peerhost} - We have found the following interesting information:") + print_good("#{cli.peerhost} - We have found the following interesting information:") report_host_info(target_info) ignore_items!(target_info) target_info.each_pair do |key, value| diff --git a/modules/auxiliary/scanner/db2/db2_version.rb b/modules/auxiliary/scanner/db2/db2_version.rb index a29b5c9230..115f1d14d2 100644 --- a/modules/auxiliary/scanner/db2/db2_version.rb +++ b/modules/auxiliary/scanner/db2/db2_version.rb @@ -35,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary if info[:excsatrd] inst,plat,ver,pta = info[:instance_name],info[:platform],info[:version],info[:plaintext_auth] report_info = "Platform: #{plat}, Version: #{ver}, Instance: #{inst}, Plain-Authentication: #{pta ? "OK" : "NO"}" - print_status("#{ip}:#{rport} DB2 - #{report_info}") + print_good("#{ip}:#{rport} DB2 - #{report_info}") report_service( :host => rhost, :port => rport, diff --git a/modules/auxiliary/scanner/db2/discovery.rb b/modules/auxiliary/scanner/db2/discovery.rb index 81e0bbf473..82fe568900 100644 --- a/modules/auxiliary/scanner/db2/discovery.rb +++ b/modules/auxiliary/scanner/db2/discovery.rb @@ -54,7 +54,7 @@ class MetasploitModule < Msf::Auxiliary :info => "#{res[2]}_#{res[1]}" ) - print_status("Host #{ip} node name is " + res[2] + " with a product id of " + res[1] ) + print_good("Host #{ip} node name is " + res[2] + " with a product id of " + res[1] ) rescue ::Rex::ConnectionError rescue ::Errno::EPIPE diff --git a/modules/auxiliary/scanner/discovery/udp_probe.rb b/modules/auxiliary/scanner/discovery/udp_probe.rb index abb929179b..b8bd145439 100644 --- a/modules/auxiliary/scanner/discovery/udp_probe.rb +++ b/modules/auxiliary/scanner/discovery/udp_probe.rb @@ -125,7 +125,7 @@ class MetasploitModule < Msf::Auxiliary end report_service(conf) - print_status("Discovered #{data[:app]} on #{k} (#{data[:info]})") + print_good("Discovered #{data[:app]} on #{k} (#{data[:info]})") end end @@ -355,7 +355,7 @@ class MetasploitModule < Msf::Auxiliary :info => inf ) - print_status("Discovered #{app} on #{pkt[1]}:#{pkt[2]} (#{inf})") + print_good("Discovered #{app} on #{pkt[1]}:#{pkt[2]} (#{inf})") end diff --git a/modules/auxiliary/scanner/discovery/udp_sweep.rb b/modules/auxiliary/scanner/discovery/udp_sweep.rb index 19c0c87af8..4924b0c545 100644 --- a/modules/auxiliary/scanner/discovery/udp_sweep.rb +++ b/modules/auxiliary/scanner/discovery/udp_sweep.rb @@ -89,7 +89,7 @@ class MetasploitModule < Msf::Auxiliary end report_service(conf) - print_status("Discovered #{data[:app]} on #{k} (#{data[:info]})") + print_good("Discovered #{data[:app]} on #{k} (#{data[:info]})") end end diff --git a/modules/auxiliary/scanner/mysql/mysql_login.rb b/modules/auxiliary/scanner/mysql/mysql_login.rb index e95983f1aa..10a45f5744 100644 --- a/modules/auxiliary/scanner/mysql/mysql_login.rb +++ b/modules/auxiliary/scanner/mysql/mysql_login.rb @@ -127,7 +127,7 @@ class MetasploitModule < Msf::Auxiliary version = data[offset..-1].unpack('Z*')[0] report_service(:host => rhost, :port => rport, :name => "mysql", :info => version) short_version = version.split('-')[0] - vprint_status "#{rhost}:#{rport} - Found remote MySQL version #{short_version}" + vprint_good "#{rhost}:#{rport} - Found remote MySQL version #{short_version}" int_version(short_version) >= int_version(target) end diff --git a/modules/auxiliary/scanner/oracle/oracle_hashdump.rb b/modules/auxiliary/scanner/oracle/oracle_hashdump.rb index ed23eed240..ab3e29bf08 100644 --- a/modules/auxiliary/scanner/oracle/oracle_hashdump.rb +++ b/modules/auxiliary/scanner/oracle/oracle_hashdump.rb @@ -128,7 +128,7 @@ class MetasploitModule < Msf::Auxiliary create_credential_login(login_data.merge(service_data)) end - print_status("Hash Table has been saved") + print_good("Hash Table has been saved") end diff --git a/modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb b/modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb index 0cc6e695ef..9a150aa042 100644 --- a/modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb +++ b/modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb @@ -45,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary =end report_service(:host => rhost, :port => rport, :name => "pcanywhere_data", :info => "") - print_status("#{rhost}:#{rport} pcAnywhere data service") + print_good("#{rhost}:#{rport} pcAnywhere data service") rescue ::Rex::ConnectionError, ::EOFError, ::Errno::ECONNRESET rescue ::Exception => e diff --git a/modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb b/modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb index 656ce151fa..57d9ddf10f 100644 --- a/modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb +++ b/modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb @@ -54,7 +54,7 @@ class MetasploitModule < Msf::Auxiliary report_service(:host => ip, :port => datastore['RPORT'], :proto => 'udp', :name => "pcanywhere_stat", :info => info) report_note(:host => ip, :port => datastore['RPORT'], :proto => 'udp', :name => "pcanywhere_stat", :update => :unique, :ntype => "pcanywhere.status", :data => data ) - print_status("#{ip}:#{datastore['RPORT']} #{info}") + print_good("#{ip}:#{datastore['RPORT']} #{info}") end end diff --git a/modules/auxiliary/scanner/portscan/tcp.rb b/modules/auxiliary/scanner/portscan/tcp.rb index 2848005f94..a088ed00fb 100644 --- a/modules/auxiliary/scanner/portscan/tcp.rb +++ b/modules/auxiliary/scanner/portscan/tcp.rb @@ -77,7 +77,7 @@ class MetasploitModule < Msf::Auxiliary } ) if s - print_status("#{ip}:#{port} - TCP OPEN") + print_good("#{ip}:#{port} - TCP OPEN") r << [ip,port,"open"] end rescue ::Rex::ConnectionRefused diff --git a/modules/auxiliary/server/capture/ftp.rb b/modules/auxiliary/server/capture/ftp.rb index f4e61f69e6..1eb8988c96 100644 --- a/modules/auxiliary/server/capture/ftp.rb +++ b/modules/auxiliary/server/capture/ftp.rb @@ -103,7 +103,7 @@ class MetasploitModule < Msf::Auxiliary proof: arg ) - print_status("FTP LOGIN #{@state[c][:name]} #{@state[c][:user]} / #{@state[c][:pass]}") + print_good("FTP LOGIN #{@state[c][:name]} #{@state[c][:user]} / #{@state[c][:pass]}") end @state[c][:pass] = data.strip diff --git a/modules/auxiliary/server/capture/http.rb b/modules/auxiliary/server/capture/http.rb index 43e9e9bcdf..59b6951249 100644 --- a/modules/auxiliary/server/capture/http.rb +++ b/modules/auxiliary/server/capture/http.rb @@ -224,7 +224,7 @@ class MetasploitModule < Msf::Auxiliary :data => req.resource.to_s, :update => :unique_data ) - print_status("HTTP LOGIN #{cli.peerhost} > #{hhead}:#{@myport} #{user} / #{pass} => #{req.resource}") + print_good("HTTP LOGIN #{cli.peerhost} > #{hhead}:#{@myport} #{user} / #{pass} => #{req.resource}") end diff --git a/modules/auxiliary/server/capture/mysql.rb b/modules/auxiliary/server/capture/mysql.rb index 57494fc407..144136570b 100644 --- a/modules/auxiliary/server/capture/mysql.rb +++ b/modules/auxiliary/server/capture/mysql.rb @@ -162,9 +162,9 @@ class MetasploitModule < Msf::Auxiliary elsif info[:username] and info[:response] mysql_send_error(c, "Access denied for user '#{info[:username]}'@'#{c.peerhost}' (using password: YES)") if info[:database] - print_status("#{@state[c][:name]} - User: #{info[:username]}; Challenge: #{@challenge.unpack('H*')[0]}; Response: #{info[:response].unpack('H*')[0]}; Database: #{info[:database]}") + print_good("#{@state[c][:name]} - User: #{info[:username]}; Challenge: #{@challenge.unpack('H*')[0]}; Response: #{info[:response].unpack('H*')[0]}; Database: #{info[:database]}") else - print_status("#{@state[c][:name]} - User: #{info[:username]}; Challenge: #{@challenge.unpack('H*')[0]}; Response: #{info[:response].unpack('H*')[0]}") + print_good("#{@state[c][:name]} - User: #{info[:username]}; Challenge: #{@challenge.unpack('H*')[0]}; Response: #{info[:response].unpack('H*')[0]}") end hash_line = "#{info[:username]}:$mysql$#{@challenge.unpack("H*")[0]}$#{info[:response].unpack('H*')[0]}" diff --git a/modules/auxiliary/server/capture/pop3.rb b/modules/auxiliary/server/capture/pop3.rb index c7eb57ec35..4ad266cc2f 100644 --- a/modules/auxiliary/server/capture/pop3.rb +++ b/modules/auxiliary/server/capture/pop3.rb @@ -100,7 +100,7 @@ class MetasploitModule < Msf::Auxiliary password: @state[c][:pass], proof: arg ) - print_status("POP3 LOGIN #{@state[c][:name]} #{@state[c][:user]} / #{@state[c][:pass]}") + print_good("POP3 LOGIN #{@state[c][:name]} #{@state[c][:user]} / #{@state[c][:pass]}") @state[c][:pass] = data.strip c.put "+OK\r\n" return diff --git a/modules/auxiliary/server/capture/postgresql.rb b/modules/auxiliary/server/capture/postgresql.rb index 7e942fb2c3..f2d7802957 100644 --- a/modules/auxiliary/server/capture/postgresql.rb +++ b/modules/auxiliary/server/capture/postgresql.rb @@ -105,7 +105,7 @@ class MetasploitModule < Msf::Auxiliary password: @state[c][:password], proof: @state[c][:database] ) - print_status("PostgreSQL LOGIN #{@state[c][:name]} #{@state[c][:username]} / #{@state[c][:password]} / #{@state[c][:database]}") + print_good("PostgreSQL LOGIN #{@state[c][:name]} #{@state[c][:username]} / #{@state[c][:password]} / #{@state[c][:database]}") # send failure message sdata = [ 0x45, 97 - 8 + @state[c][:username].length].pack("CN") sdata << "SFATAL" diff --git a/modules/auxiliary/server/capture/smtp.rb b/modules/auxiliary/server/capture/smtp.rb index df84e91b8f..868f11d845 100644 --- a/modules/auxiliary/server/capture/smtp.rb +++ b/modules/auxiliary/server/capture/smtp.rb @@ -121,7 +121,7 @@ class MetasploitModule < Msf::Auxiliary password: @state[c][:pass], proof: arg ) - print_status("SMTP LOGIN #{@state[c][:name]} #{@state[c][:user]} / #{@state[c][:pass]}") + print_good("SMTP LOGIN #{@state[c][:name]} #{@state[c][:user]} / #{@state[c][:pass]}") end c.put "503 Server Error\r\n" diff --git a/modules/auxiliary/server/openssl_heartbeat_client_memory.rb b/modules/auxiliary/server/openssl_heartbeat_client_memory.rb index af073b3d9e..97be76d8a5 100644 --- a/modules/auxiliary/server/openssl_heartbeat_client_memory.rb +++ b/modules/auxiliary/server/openssl_heartbeat_client_memory.rb @@ -264,11 +264,11 @@ class MetasploitModule < Msf::Auxiliary nil, "OpenSSL Heartbleed client memory" ) - print_status("#{@state[c][:name]} Heartbeat data stored in #{path}") + print_good("#{@state[c][:name]} Heartbeat data stored in #{path}") rescue ::Interrupt raise $! rescue ::Exception - print_status("#{@state[c][:name]} Heartbeat data could not be stored: #{$!.class} #{$!}") + print_error("#{@state[c][:name]} Heartbeat data could not be stored: #{$!.class} #{$!}") end # Report the memory disclosure as a vulnerability on the host