From 43715eeb7fb9686576baf7d1ae649c73a36bd4a6 Mon Sep 17 00:00:00 2001 From: Meatballs Date: Mon, 3 Mar 2014 22:06:05 +0000 Subject: [PATCH] Blame @OJ He changed the clipboard API underneat me. --- lib/msf/core/post/windows/shadowcopy.rb | 2 +- lib/msf/core/post/windows/wmic.rb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/msf/core/post/windows/shadowcopy.rb b/lib/msf/core/post/windows/shadowcopy.rb index 947b2671b3..c1c14de5f4 100644 --- a/lib/msf/core/post/windows/shadowcopy.rb +++ b/lib/msf/core/post/windows/shadowcopy.rb @@ -121,7 +121,7 @@ module ShadowCopy # def create_shadowcopy(volume) result = wmic_query("shadowcopy call create \"ClientAccessible\", \"#{volume}\"") - puts result + retval = result.match(/ReturnValue = (\d)/) case retval[1].to_i when 0 diff --git a/lib/msf/core/post/windows/wmic.rb b/lib/msf/core/post/windows/wmic.rb index 042d319f9d..f2e5fc965d 100644 --- a/lib/msf/core/post/windows/wmic.rb +++ b/lib/msf/core/post/windows/wmic.rb @@ -50,10 +50,8 @@ module WMIC if extapi result = session.extapi.clipboard.get_data.first - session.extapi.clipboard.set_text("") - - if result[:type] == :text - result_text = result[:data] + if result[1].has_key? 'Text' + result_text = result[1]['Text'] else result_text = "" end