Disable default sorting on MSSQL results
When printing output using the `mssql_print_reply`, the output gets sorted by default by the first column. This can distort the output, especially when the row order is crucial like in case of executing external commands with `mssql_xpcmdshell`. This patch disables sorting by initializing Rex::Ui::Text::Table with SortIndex = -1.bug/bundler_fix
parent
791b6f69c2
commit
80243c6e4d
|
@ -696,7 +696,8 @@ module Exploit::Remote::MSSQL
|
||||||
tbl = Rex::Ui::Text::Table.new(
|
tbl = Rex::Ui::Text::Table.new(
|
||||||
'Indent' => 1,
|
'Indent' => 1,
|
||||||
'Header' => "",
|
'Header' => "",
|
||||||
'Columns' => info[:colnames]
|
'Columns' => info[:colnames],
|
||||||
|
'SortIndex' => -1
|
||||||
)
|
)
|
||||||
|
|
||||||
info[:rows].each do |row|
|
info[:rows].each do |row|
|
||||||
|
|
Loading…
Reference in New Issue