From 45e22d53d243832fb5ac601ce5e643a41c8b0e12 Mon Sep 17 00:00:00 2001 From: Alan Foster Date: Tue, 23 Feb 2021 23:48:05 +0000 Subject: [PATCH] Re-add color to search command --- Gemfile.lock | 2 +- lib/msf/ui/console/command_dispatcher/creds.rb | 2 +- lib/msf/ui/console/command_dispatcher/modules.rb | 2 +- .../msf/ui/console/command_dispatcher/creds_spec.rb | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c9d670ef13..3e9fc2188f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -353,7 +353,7 @@ GEM rex-socket rex-text rex-struct2 (0.1.3) - rex-text (0.2.31) + rex-text (0.2.33) rex-zip (0.1.4) rex-text rexml (3.2.4) diff --git a/lib/msf/ui/console/command_dispatcher/creds.rb b/lib/msf/ui/console/command_dispatcher/creds.rb index 80fbcc8c4c..8599233b1d 100644 --- a/lib/msf/ui/console/command_dispatcher/creds.rb +++ b/lib/msf/ui/console/command_dispatcher/creds.rb @@ -434,7 +434,7 @@ class Creds 'Header' => "Credentials", # For now, don't perform any word wrapping on the cred table as it breaks the workflow of # copying credentials and pasting them into applications - 'Width' => ::BigDecimal::INFINITY, + 'WordWrap' => false, 'Columns' => cred_table_columns, 'SearchTerm' => search_term } diff --git a/lib/msf/ui/console/command_dispatcher/modules.rb b/lib/msf/ui/console/command_dispatcher/modules.rb index 08ab33620a..78b7eded1d 100644 --- a/lib/msf/ui/console/command_dispatcher/modules.rb +++ b/lib/msf/ui/console/command_dispatcher/modules.rb @@ -1303,7 +1303,7 @@ module Msf 'SearchTerm' => row_filter, # For now, don't perform any word wrapping on the search table as it breaks the workflow of # copying module names in conjunction with the `use ` command - 'Width' => ::BigDecimal::INFINITY, + 'WordWrap' => false, 'Columns' => [ '#', 'Name', diff --git a/spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb b/spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb index 62ce7524f2..cd735d4e4e 100644 --- a/spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb +++ b/spec/lib/msf/ui/console/command_dispatcher/creds_spec.rb @@ -73,7 +73,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do '', 'host origin service public private realm private_type JtR Format', '---- ------ ------- ------ ------- ----- ------------ ----------', - ' thisuser thispass Password' + ' thisuser thispass Password ' ]) end @@ -85,7 +85,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do '', 'host origin service public private realm private_type JtR Format', '---- ------ ------- ------ ------- ----- ------------ ----------', - ' thisuser thispass Password' + ' thisuser thispass Password ' ]) end @@ -98,7 +98,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do '', 'host origin service public private realm private_type JtR Format', '---- ------ ------- ------ ------- ----- ------------ ----------', - ' nonblank_pass Password' + ' nonblank_pass Password ' ]) end end @@ -111,7 +111,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do '', 'host origin service public private realm private_type JtR Format', '---- ------ ------- ------ ------- ----- ------------ ----------', - ' nonblank_user Password' + ' nonblank_user Password ' ]) end end @@ -208,7 +208,7 @@ RSpec.describe Msf::Ui::Console::CommandDispatcher::Creds do '', 'host origin service public private realm private_type JtR Format', '---- ------ ------- ------ ------- ----- ------------ ----------', - ' thisuser thispass Password' + ' thisuser thispass Password ' ]) end end