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

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