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
Markus Wulftange 2013-09-09 20:14:48 +02:00
parent 791b6f69c2
commit 80243c6e4d
1 changed files with 4 additions and 3 deletions

View File

@ -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|