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
|
@ -694,9 +694,10 @@ module Exploit::Remote::MSSQL
|
|||
if(info[:rows] and not info[:rows].empty?)
|
||||
|
||||
tbl = Rex::Ui::Text::Table.new(
|
||||
'Indent' => 1,
|
||||
'Header' => "",
|
||||
'Columns' => info[:colnames]
|
||||
'Indent' => 1,
|
||||
'Header' => "",
|
||||
'Columns' => info[:colnames],
|
||||
'SortIndex' => -1
|
||||
)
|
||||
|
||||
info[:rows].each do |row|
|
||||
|
|
Loading…
Reference in New Issue