通过javascript覆盖谷歌浏览器扩展



如何使用javascript停止/覆盖(我不知道覆盖是否是正确的词(谷歌浏览器扩展中的函数?或者捕获扩展的变量名称?

例如,minerBlock 扩展使用以下脚本来捕获 coinhive 矿工的变量并停止它:

if( this[name]
                && typeof this[name] !== 'undefined'
                && typeof this[name].isRunning === 'function'
                && typeof this[name].stop === 'function'
                && typeof this[name]._siteKey === 'string'
                ) {
                console.log('[+] Coinhive miner found, stopping...');
                this[name].stop();
                this[name] = null;
                triggerMblockEvent('CoinHive (inline)');
            }

谢谢!

可能吗?答:是和/或否。在Web服务器端,您只能控制浏览器允许您控制的内容。简单来说,这意味着您可以控制发送回它的数据(HTML,javascript,标头等(。仅此而已。

看看这个答案和这个。

最新更新