简体   繁体   中英

Override a google chrome extension by javascript

How is it possible to stop/override (I don't know if override is the right word) a function inside an extension of google chrome using javascript? Or catch a variable name of an extension?

For example, minerBlock extension uses this script to catch the variable of coinhive miner and to stop it:

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)');
            }

Thanks!

Is It possible? Answer: Yes and/or NO. At the web server end, you are only only able to control what the browser will allow you to control. In simple terms, this means you can control the data (HTML, javascript, headers etc) that you send back to it. That's about it.

Check out this answer and this .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM