diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb index 53a18e1aa3..83aa6694da 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb @@ -170,10 +170,7 @@ class Config ret = [] res = client.send_request(req) res.each(TLV_TYPE_PRIVILEGE) do |p| - ret << { - priv: p.get_tlv_value(TLV_TYPE_PRIVILEGE_NAME), - enabled: p.get_tlv_value(TLV_TYPE_PRIVILEGE_ENABLED), - } + ret << p.value end ret end diff --git a/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb b/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb index 6ec7d0b180..5a00e8a111 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb @@ -16,9 +16,7 @@ TLV_TYPE_HANDLE = TLV_META_TYPE_QWORD | 600 TLV_TYPE_INHERIT = TLV_META_TYPE_BOOL | 601 TLV_TYPE_PROCESS_HANDLE = TLV_META_TYPE_QWORD | 630 TLV_TYPE_THREAD_HANDLE = TLV_META_TYPE_QWORD | 631 -TLV_TYPE_PRIVILEGE = TLV_META_TYPE_GROUP | 632 -TLV_TYPE_PRIVILEGE_NAME = TLV_META_TYPE_STRING | 633 -TLV_TYPE_PRIVILEGE_ENABLED = TLV_META_TYPE_BOOL | 634 +TLV_TYPE_PRIVILEGE = TLV_META_TYPE_STRING | 632 ## # diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb index c1d394bca0..5e7e987eda 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb @@ -899,12 +899,12 @@ class Console::CommandDispatcher::Stdapi::Sys 'Header' => 'Enabled Process Privileges', 'Indent' => 0, 'SortIndex' => 1, - 'Columns' => ['Priv Name', 'Enabled'] + 'Columns' => ['Name'] ) privs = client.sys.config.getprivs client.sys.config.getprivs.each do |priv| - table << [priv[:priv], priv[:enabled].to_s] + table << [priv] end print_line