Skip to content

Commit 1e7663c

Browse files
committed
Land rapid7#7200, Rex::Ui::Text cleanup
2 parents a6ba386 + 0fd8336 commit 1e7663c

File tree

151 files changed

+283
-1059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+283
-1059
lines changed

Gemfile.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,27 @@ PATH
5151
GEM
5252
remote: https://rubygems.org/
5353
specs:
54-
actionpack (4.2.7)
55-
actionview (= 4.2.7)
56-
activesupport (= 4.2.7)
54+
actionpack (4.2.7.1)
55+
actionview (= 4.2.7.1)
56+
activesupport (= 4.2.7.1)
5757
rack (~> 1.6)
5858
rack-test (~> 0.6.2)
5959
rails-dom-testing (~> 1.0, >= 1.0.5)
6060
rails-html-sanitizer (~> 1.0, >= 1.0.2)
61-
actionview (4.2.7)
62-
activesupport (= 4.2.7)
61+
actionview (4.2.7.1)
62+
activesupport (= 4.2.7.1)
6363
builder (~> 3.1)
6464
erubis (~> 2.7.0)
6565
rails-dom-testing (~> 1.0, >= 1.0.5)
6666
rails-html-sanitizer (~> 1.0, >= 1.0.2)
67-
activemodel (4.2.7)
68-
activesupport (= 4.2.7)
67+
activemodel (4.2.7.1)
68+
activesupport (= 4.2.7.1)
6969
builder (~> 3.1)
70-
activerecord (4.2.7)
71-
activemodel (= 4.2.7)
72-
activesupport (= 4.2.7)
70+
activerecord (4.2.7.1)
71+
activemodel (= 4.2.7.1)
72+
activesupport (= 4.2.7.1)
7373
arel (~> 6.0)
74-
activesupport (4.2.7)
74+
activesupport (4.2.7.1)
7575
i18n (~> 0.7)
7676
json (~> 1.7, >= 1.7.7)
7777
minitest (~> 5.1)
@@ -112,12 +112,12 @@ GEM
112112
multi_test (>= 0.1.2)
113113
cucumber-core (1.5.0)
114114
gherkin (~> 4.0)
115-
cucumber-rails (1.4.3)
115+
cucumber-rails (1.4.4)
116116
capybara (>= 1.1.2, < 3)
117117
cucumber (>= 1.3.8, < 3)
118118
mime-types (>= 1.16, < 4)
119119
nokogiri (~> 1.5)
120-
railties (>= 3, < 5)
120+
railties (>= 3, < 5.1)
121121
cucumber-wire (0.0.1)
122122
diff-lcs (1.2.5)
123123
docile (1.1.5)
@@ -213,17 +213,17 @@ GEM
213213
rails-deprecated_sanitizer (>= 1.0.1)
214214
rails-html-sanitizer (1.0.3)
215215
loofah (~> 2.0)
216-
railties (4.2.7)
217-
actionpack (= 4.2.7)
218-
activesupport (= 4.2.7)
216+
railties (4.2.7.1)
217+
actionpack (= 4.2.7.1)
218+
activesupport (= 4.2.7.1)
219219
rake (>= 0.8.7)
220220
thor (>= 0.18.1, < 2.0)
221221
rake (11.2.2)
222222
rb-readline-r7 (0.5.2.0)
223223
recog (2.0.21)
224224
nokogiri
225225
redcarpet (3.3.4)
226-
rex-arch (0.1.0)
226+
rex-arch (0.1.1)
227227
rex-text
228228
rex-java (0.1.2)
229229
rex-ole (0.1.2)
@@ -235,12 +235,12 @@ GEM
235235
rex-text
236236
rex-registry (0.1.0)
237237
rex-struct2 (0.1.0)
238-
rex-text (0.1.1)
238+
rex-text (0.2.1)
239239
rex-zip (0.1.0)
240240
rex-text
241241
rkelly-remix (0.0.6)
242242
robots (0.10.1)
243-
rspec-core (3.5.1)
243+
rspec-core (3.5.2)
244244
rspec-support (~> 3.5.0)
245245
rspec-expectations (3.5.0)
246246
diff-lcs (>= 1.2.0, < 2.0)
@@ -282,7 +282,7 @@ GEM
282282
windows_error (0.0.2)
283283
xpath (2.0.0)
284284
nokogiri (~> 1.3)
285-
yard (0.9.0)
285+
yard (0.9.5)
286286

287287
PLATFORMS
288288
ruby

lib/msf/base/serializer/readable_text.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def self.dump_module(mod, indent = " ")
4646
# @param h [String] the string to display as the table heading.
4747
# @return [String] the string form of the table.
4848
def self.dump_exploit_targets(mod, indent = '', h = nil)
49-
tbl = Rex::Ui::Text::Table.new(
49+
tbl = Rex::Text::Table.new(
5050
'Indent' => indent.length,
5151
'Header' => h,
5252
'Columns' =>
@@ -70,7 +70,7 @@ def self.dump_exploit_targets(mod, indent = '', h = nil)
7070
# @param h [String] the string to display as the table heading.
7171
# @return [String] the string form of the table.
7272
def self.dump_exploit_target(mod, indent = '', h = nil)
73-
tbl = Rex::Ui::Text::Table.new(
73+
tbl = Rex::Text::Table.new(
7474
'Indent' => indent.length,
7575
'Header' => h,
7676
'Columns' =>
@@ -92,7 +92,7 @@ def self.dump_exploit_target(mod, indent = '', h = nil)
9292
# @param h [String] the string to display as the table heading.
9393
# @return [String] the string form of the table.
9494
def self.dump_module_actions(mod, indent = '', h = nil)
95-
tbl = Rex::Ui::Text::Table.new(
95+
tbl = Rex::Text::Table.new(
9696
'Indent' => indent.length,
9797
'Header' => h,
9898
'Columns' =>
@@ -116,7 +116,7 @@ def self.dump_module_actions(mod, indent = '', h = nil)
116116
# @param h [String] the string to display as the table heading.
117117
# @return [String] the string form of the table.
118118
def self.dump_module_action(mod, indent = '', h = nil)
119-
tbl = Rex::Ui::Text::Table.new(
119+
tbl = Rex::Text::Table.new(
120120
'Indent' => indent.length,
121121
'Header' => h,
122122
'Columns' =>
@@ -139,7 +139,7 @@ def self.dump_module_action(mod, indent = '', h = nil)
139139
# @param h [String] the string to display as the table heading.
140140
# @return [String] the string form of the table.
141141
def self.dump_compatible_payloads(exploit, indent = '', h = nil)
142-
tbl = Rex::Ui::Text::Table.new(
142+
tbl = Rex::Text::Table.new(
143143
'Indent' => indent.length,
144144
'Header' => h,
145145
'Columns' =>
@@ -390,7 +390,7 @@ def self.dump_generic_module(mod, indent = '')
390390
# @param missing [Boolean] dump only empty required options.
391391
# @return [String] the string form of the information.
392392
def self.dump_options(mod, indent = '', missing = false)
393-
tbl = Rex::Ui::Text::Table.new(
393+
tbl = Rex::Text::Table.new(
394394
'Indent' => indent.length,
395395
'Columns' =>
396396
[
@@ -419,7 +419,7 @@ def self.dump_options(mod, indent = '', missing = false)
419419
# @param indent [String] the indentation to use.
420420
# @return [String] the string form of the information.
421421
def self.dump_advanced_options(mod, indent = '')
422-
tbl = Rex::Ui::Text::Table.new(
422+
tbl = Rex::Text::Table.new(
423423
'Indent' => indent.length,
424424
'Columns' =>
425425
[
@@ -444,7 +444,7 @@ def self.dump_advanced_options(mod, indent = '')
444444
# @param indent [String] the indentation to use.
445445
# @return [String] the string form of the information.
446446
def self.dump_evasion_options(mod, indent = '')
447-
tbl = Rex::Ui::Text::Table.new(
447+
tbl = Rex::Text::Table.new(
448448
'Indent' => indent.length,
449449
'Columns' =>
450450
[
@@ -490,7 +490,7 @@ def self.dump_references(mod, indent = '')
490490
# @param col [Integer] the column width.
491491
# @return [String] the formatted DataStore contents.
492492
def self.dump_datastore(name, ds, indent = DefaultIndent, col = DefaultColumnWrap)
493-
tbl = Rex::Ui::Text::Table.new(
493+
tbl = Rex::Text::Table.new(
494494
'Indent' => indent,
495495
'Header' => name,
496496
'Columns' =>
@@ -529,7 +529,7 @@ def self.dump_sessions(framework, opts={})
529529
columns << 'Information'
530530
columns << 'Connection'
531531

532-
tbl = Rex::Ui::Text::Table.new(
532+
tbl = Rex::Text::Table.new(
533533
'Indent' => indent,
534534
'Header' => "Active sessions",
535535
'Columns' => columns)
@@ -653,7 +653,7 @@ def self.dump_jobs(framework, verbose = false, indent = DefaultIndent, col = Def
653653
columns += [ "URIPATH", "Start Time", "Handler opts" ]
654654
end
655655

656-
tbl = Rex::Ui::Text::Table.new(
656+
tbl = Rex::Text::Table.new(
657657
'Indent' => indent,
658658
'Header' => "Jobs",
659659
'Columns' => columns

lib/msf/core/exploit/browser_autopwn2.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def show_ready_exploits
517517
# As an user, you shouldn't be using any of these paths anyway.
518518
columns.delete('Path') if !datastore['VERBOSE']
519519

520-
table = Rex::Ui::Text::Table.new(
520+
table = Rex::Text::Table.new(
521521
'Header' => 'Exploits',
522522
'Indent' => 1,
523523
'Columns' => columns
@@ -625,7 +625,7 @@ def log_click(ip, data='')
625625
# @return [void]
626626
def show_exploit_list(ip, tag, current_exploit_list)
627627
order = 1
628-
table = Rex::Ui::Text::Table.new(
628+
table = Rex::Text::Table.new(
629629
'Header' => '',
630630
'Indent' => 1,
631631
'Columns' => ['Order', 'IP', 'Exploit']

lib/msf/core/exploit/mssql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ def mssql_print_reply(info)
702702

703703
if(info[:rows] and not info[:rows].empty?)
704704

705-
tbl = Rex::Ui::Text::Table.new(
705+
tbl = Rex::Text::Table.new(
706706
'Indent' => 1,
707707
'Header' => "",
708708
'Columns' => info[:colnames],

lib/msf/core/exploit/postgres.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def postgres_query(sql=nil,doprint=false)
184184

185185
# If resp is not actually a Connection::Result object, then return
186186
# :error (but not an actual Exception, that's up to the caller.
187-
# Otherwise, create a rowset using Rex::Ui::Text::Table (if there's
187+
# Otherwise, create a rowset using Rex::Text::Table (if there's
188188
# more than 0 rows) and return :complete.
189189
def postgres_print_reply(resp=nil,sql=nil)
190190
ip = datastore['RHOST']
@@ -194,7 +194,7 @@ def postgres_print_reply(resp=nil,sql=nil)
194194
if resp.rows and resp.fields
195195
print_status "#{ip}:#{port} Rows Returned: #{resp.rows.size}" if verbose
196196
if resp.rows.size > 0
197-
tbl = Rex::Ui::Text::Table.new(
197+
tbl = Rex::Text::Table.new(
198198
'Indent' => 4,
199199
'Header' => "Query Text: '#{sql}'",
200200
'Columns' => resp.fields.map {|x| x.name}

lib/msf/core/exploit/winrm.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def parse_wql_response(response)
164164
rows << row_data
165165
end
166166
columns.uniq!
167-
response_data = Rex::Ui::Text::Table.new(
167+
response_data = Rex::Text::Table.new(
168168
'Header' => "#{datastore['WQL']} (#{rhost})",
169169
'Indent' => 1,
170170
'Columns' => columns

lib/msf/ui/console/command_dispatcher/db.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def cmd_hosts(*args)
423423
end
424424

425425
# If we got here, we're searching. Delete implies search
426-
tbl = Rex::Ui::Text::Table.new(
426+
tbl = Rex::Text::Table.new(
427427
{
428428
'Header' => "Hosts",
429429
'Columns' => col_names,
@@ -650,7 +650,7 @@ def cmd_services(*args)
650650
if col_search
651651
col_names = col_search
652652
end
653-
tbl = Rex::Ui::Text::Table.new({
653+
tbl = Rex::Text::Table.new({
654654
'Header' => "Services",
655655
'Columns' => ['host'] + col_names,
656656
})
@@ -1029,7 +1029,7 @@ def creds_search(*args)
10291029
'Columns' => cred_table_columns
10301030
}
10311031

1032-
tbl = Rex::Ui::Text::Table.new(tbl_opts)
1032+
tbl = Rex::Text::Table.new(tbl_opts)
10331033

10341034
::ActiveRecord::Base.connection_pool.with_connection {
10351035
query = Metasploit::Credential::Core.where( workspace_id: framework.db.workspace )
@@ -1341,7 +1341,7 @@ def cmd_notes(*args)
13411341
end
13421342

13431343
# Now display them
1344-
csv_table = Rex::Ui::Text::Table.new(
1344+
csv_table = Rex::Text::Table.new(
13451345
'Header' => 'Notes',
13461346
'Indent' => 1,
13471347
'Columns' => ['Time', 'Host', 'Service', 'Port', 'Protocol', 'Type', 'Data']
@@ -1501,7 +1501,7 @@ def cmd_loot(*args)
15011501
end
15021502
end
15031503

1504-
tbl = Rex::Ui::Text::Table.new({
1504+
tbl = Rex::Text::Table.new({
15051505
'Header' => "Loot",
15061506
'Columns' => [ 'host', 'service', 'type', 'name', 'content', 'info', 'path' ],
15071507
})

lib/msf/ui/console/table.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Console
99
# Console table display wrapper that allows for stylized tables
1010
#
1111
###
12-
class Table < Rex::Ui::Text::Table
12+
class Table < Rex::Text::Table
1313

1414
#
1515
# Default table styles.

0 commit comments

Comments
 (0)