From 7e0c25559115f437c60844ece2781b559edbf6ed Mon Sep 17 00:00:00 2001 From: b0yd Date: Fri, 23 Mar 2018 15:56:12 -0400 Subject: [PATCH] Formatted reg binary type to hex when displaying query results. --- .../meterpreter/ui/console/command_dispatcher/stdapi/sys.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 5e7e987eda..021b5dc0ac 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 @@ -840,12 +840,16 @@ class Console::CommandDispatcher::Stdapi::Sys end v = open_key.query_value(value) + data = v.data + if v.type == REG_BINARY + data = data.unpack('H*')[0] + end print( "Key: #{key}\n" + "Name: #{v.name}\n" + "Type: #{v.type_to_s}\n" + - "Data: #{v.data}\n") + "Data: #{data}\n") when "queryclass" open_key = nil