diff --git a/lib/msf/core/plugin.rb b/lib/msf/core/plugin.rb index ac9854e805..08a2297a50 100644 --- a/lib/msf/core/plugin.rb +++ b/lib/msf/core/plugin.rb @@ -107,35 +107,35 @@ class Plugin # # Prints an error message. # - def print_error(msg) + def print_error(msg='') output.print_error(msg) if (output) end # # Prints a 'good' message. # - def print_good(msg) + def print_good(msg='') output.print_good(msg) if (output) end # # Prints a status line. # - def print_status(msg) + def print_status(msg='') output.print_status(msg) if (output) end # # Prints an undecorated line of information. # - def print_line(msg) + def print_line(msg='') output.print_line(msg) if (output) end # # Prints a message with no decoration. # - def print(msg) + def print(msg='') output.print(msg) if (output) end diff --git a/lib/rex/io/bidirectional_pipe.rb b/lib/rex/io/bidirectional_pipe.rb index 89d15360f7..83480d8bd4 100644 --- a/lib/rex/io/bidirectional_pipe.rb +++ b/lib/rex/io/bidirectional_pipe.rb @@ -62,7 +62,7 @@ class BidirectionalPipe < Rex::Ui::Text::Input buf end - def print(msg) + def print(msg='') @subscribers_out.each_pair { |id, buf| begin @subscribers_ref[id] ? @subscribers_ref[id].call(msg) : buf.print(msg) @@ -74,22 +74,22 @@ class BidirectionalPipe < Rex::Ui::Text::Input msg end - def print_error(msg) + def print_error(msg='') print_line('[-] ' + msg) end - def print_line(msg) + def print_line(msg='') print(msg + "\n") end - def print_good(msg) + def print_good(msg='') print_line('[+] ' + msg) end def flush end - def print_status(msg) + def print_status(msg='') print_line('[*] ' + msg) end diff --git a/lib/rex/ui/output.rb b/lib/rex/ui/output.rb index 3970f1b09d..7b4bbe003e 100644 --- a/lib/rex/ui/output.rb +++ b/lib/rex/ui/output.rb @@ -22,31 +22,31 @@ class Output # # Prints an error message. # - def print_error(msg) + def print_error(msg='') end # # Prints a 'good' message. # - def print_good(msg) + def print_good(msg='') end # # Prints a status line. # - def print_status(msg) + def print_status(msg='') end # # Prints an undecorated line of information. # - def print_line(msg) + def print_line(msg='') end # # Prints a message with no decoration. # - def print(msg) + def print(msg='') end # diff --git a/lib/rex/ui/subscriber.rb b/lib/rex/ui/subscriber.rb index 5851e1407b..c5a8749b70 100644 --- a/lib/rex/ui/subscriber.rb +++ b/lib/rex/ui/subscriber.rb @@ -18,35 +18,35 @@ module Subscriber # # Wraps user_output.print_line # - def print_line(msg) + def print_line(msg='') user_output.print_line(msg) if (user_output) end # # Wraps user_output.print_status # - def print_status(msg) + def print_status(msg='') user_output.print_status(msg) if (user_output) end # # Wraps user_output.print_error # - def print_error(msg) + def print_error(msg='') user_output.print_error(msg) if (user_output) end # # Wraps user_output.print_good # - def print_good(msg) + def print_good(msg='') user_output.print_good(msg) if (user_output) end # # Wraps user_output.print # - def print(msg) + def print(msg='') user_output.print(msg) if (user_output) end diff --git a/lib/rex/ui/text/shell.rb b/lib/rex/ui/text/shell.rb index 675cfe758e..1761ea4bbf 100644 --- a/lib/rex/ui/text/shell.rb +++ b/lib/rex/ui/text/shell.rb @@ -215,7 +215,7 @@ module Shell # # Prints an error message to the output handle. # - def print_error(msg) + def print_error(msg='') return if (output.nil?) # Errors are not subject to disabled output @@ -225,7 +225,7 @@ module Shell # # Prints a status message to the output handle. # - def print_status(msg) + def print_status(msg='') return if (disable_output == true) log_output(output.print_status(msg)) @@ -234,7 +234,7 @@ module Shell # # Prints a line of text to the output handle. # - def print_line(msg) + def print_line(msg='') return if (disable_output == true) log_output(output.print_line(msg)) @@ -243,7 +243,7 @@ module Shell # # Prints a raw message to the output handle. # - def print(msg) + def print(msg='') return if (disable_output == true) log_output(output.print(msg)) end