From 284a45a6c5c153d946843a3b012d33a9a611b333 Mon Sep 17 00:00:00 2001 From: Meatballs Date: Sat, 14 Dec 2013 22:58:16 +0000 Subject: [PATCH] Convert UTF16 to ASCII --- lib/msf/core/post/windows/wmic.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/post/windows/wmic.rb b/lib/msf/core/post/windows/wmic.rb index 090ab0efb7..9cbbbd3ec1 100644 --- a/lib/msf/core/post/windows/wmic.rb +++ b/lib/msf/core/post/windows/wmic.rb @@ -23,7 +23,7 @@ module WMIC def wmic_query(query, server=datastore['RHOST']) extapi = load_extapi - extapi = false + result_text = "" if datastore['SMBUser'] @@ -58,7 +58,7 @@ module WMIC result_text = "" end else - result_text = Rex::Text.to_ascii(read_file(out_file)) + result_text = Rex::Text.to_ascii(read_file(out_file))[1..-1] file_rm(out_file) end