AdguardTeam / AdguardFilters

AdGuard Content Blocking Filters
https://adguard.com/
GNU General Public License v3.0
3.17k stars 632 forks source link

Websites using I10C scripts #3844

Closed theseanl closed 6 years ago

theseanl commented 7 years ago

We can validate each sites reportedly having instartlogic scripts in the following way: enable

#%#var a = {}; Object.defineProperty( window, 'INSTART_TARGET_NAME', { get: function(){ return a; }, set: function(i){ alert(i); a = i; } });

Once their 'nanovisor' script at the start of the html document is executed, it sets the value of INSTART_TARGET_NAME which seems to be to avoid executing it twice.

For sites of which the value is abd, I guess we can remove the script, so we can use $$script[tag-content="===typeof I10C"][min-length="20000"][max-length="32768"] or

#%#(function(){var d=Math.random().toString(36).substring(2),e=function(){},f=function(){return!1};window.I10C=new Proxy({},{get:function(b,a){switch(a){case "CanRun":return f;case "Morph":return void 0;default:if(void 0===b[a])throw Error(d);return b[a]}},set:function(b,a,c){switch(a){case "CanRun":break;default:b[a]=c}}});window.INSTART=new Proxy({},{get:function(b,a){switch(a){case "Init":return e;default:if(void 0===b[a])throw Error(d);return b[a]}},set:function(b,a,c){switch(a){case "Init":break;default:b[a]= c}}})})();

(based on a scriptlet being used in uBO-extra https://github.com/uBlockOrigin/uAssets/issues/227)

For sites of which the value is abd.html_streaming, those use I10C.HtmlStreaming.InsertTag() and other apis to write htmls (mostly script tags) to the document which are necessary to their functioning.

There was one website which had a value different from above, opshead.com had optimus.html_streaming and it didn't do any obnoxious stuff, they seems to be using it for other purposes than fighting with adblockers.

Attached a result - InstartLogic.zip (Updated 29 June)

Sites marked with 'x' were those didn't set INSTART_TARGET_NAME. Maybe they are testing it in their own environment, or using it for certain targeted population.

ameshkov commented 7 years ago

@Alex-302 we may need your help as well.

ameshkov commented 7 years ago

For desktop & android:

Let's use $$script[tag-content="===typeof I10C"][min-length="20000"][max-length="32768"] for abd websites right away. But only for those who really use g00 stuff to reinject the ads.

Alex-302 commented 7 years ago

@ameshkov

we may need your help as well.

how can I help?

ghajini commented 7 years ago

@seanl-adg ,your fix doesn't work...tried google chrome 59 canary....adguard...default filter updated......

![screenshot 201](https://cloud.githubusercontent.com/assets/20338483/24323922/05df2bd4-11a3-11e7-9aa9-b62d61a3a193.png) ![screenshot 202](https://cloud.githubusercontent.com/assets/20338483/24323923/05df5424-11a3-11e7-8db6-5e0139fb992c.png) ![screenshot 203](https://cloud.githubusercontent.com/assets/20338483/24323924/05e15972-11a3-11e7-8d09-db01f1523a92.png)
ghajini commented 7 years ago

@seanl-adg test site www.sandiegotribune.com Need to update anti IL code again google chrome 59 adguard 2.5.11 do i need to use adguard for windows standalone software

theseanl commented 7 years ago

@ghajini Hi, you will have to use adguard 2.6.0 version or above to apply our current anti IL code. 2.6 version is not yet released in chrome webstore. Please wait until its release, or try building the adguard extension from the source code, which you can obtain at https://github.com/AdguardTeam/AdguardBrowserExtension/. In 2.6 version, our JS rule is applied eariler than IL's code.

F4z commented 7 years ago

I think, that they change their script again. I see ads here -http://www.chicagotribune.com/

Adguard for Windows 6.1.331.1732

Screenshot ![image](https://cloud.githubusercontent.com/assets/11742596/25107067/68548af2-23cd-11e7-8e4a-a2774ea524ec.png)
ameshkov commented 7 years ago

Yep, not long ago: //copyright Fri Apr 14 2017 01:04:41 GMT+0000 (UTC)

ameshkov commented 7 years ago

Temporary solution for desktop programs and for Android:

||chicagotribune.com^$replace=/<script>[\s\S]+?nanovisor injection[\s\S]+?<\/script>/<!-- Bye-bye g00 stuff -->/,important
ghajini commented 7 years ago

@seanl-adg something changed recently...i see this chrome_2017-07-15_19-55-48

also this one(not on homepage but articles) chrome_2017-07-15_20-14-32

cpu usage increased

using adguard 2.6.7

ghajini commented 7 years ago

@ameshkov and @seanl-adg

theseanl commented 7 years ago

It was reproduced before, but currently I am not being served with a page with InstartLogic's stuff.

It seems that the browser extension is still cannot apply JS rules sufficiently fast. IL rules are applied on both nationalpost.com and wrestlezone.com. @ameshkov Could you please confirm that it is because of timing issues?

ameshkov commented 7 years ago

@ameshkov Could you please confirm that it is because of timing issues?

Looks like it is. And to have it sorted out we should execute that code from a content script.

Is that IL stuff bad enough to have a special case for them in the content script?

ghajini commented 7 years ago

still got g00....going to homepage of www.sandiegotribune.com and clicking on any story invokes g00 http://prntscr.com/fzoxmx

ads http://prntscr.com/fzoy0e

edit: well i understood @seanl-adg , solution for g00 crap is possible only in standalone programs(adguard for windows) & not adguard browser extension....i will try to use ubo extra+ublock origin until stable fix arrives for adguard browser extension... thanx

ameshkov commented 7 years ago

solution for g00 crap is possible only in standalone programs

Not really, what he means is that blocking IL stuff requires us to hard-code the anti-IL code into the extension instead of using the filtering rules.

ghajini commented 7 years ago

Okk waiting for anti-IL code in next release of browser extension

danidoedel commented 7 years ago

@seanl-adg Could you please look into the InstartLogic script again? It was updated last friday and the filter doesn't seem to work anymore.

danidoedel commented 7 years ago

Few more sites using InstartLogic:

danidoedel commented 7 years ago

Nice, no response at all... Anyone? @seanl-adg @ameshkov @Alex-302 @AdamWr

ameshkov commented 7 years ago

@danidoedel sorry for the delay.

@AdamWr please check the websites list, $$ anti-IL rule should be updated.

AdamWr commented 7 years ago

Added.

I wasn't able to reproduce IL script on these websites: http://www.chroniclelive.co.uk/ http://www.trustedreviews.com/ http://www.tv.com/

ghajini commented 7 years ago

Many users use adguard browser extension, adguard suffers instart logic crap(all mentioned sites) for browser extension users? anybody working for browser extension users?

BooBerry commented 7 years ago

Well, the problem is the browser extensions need to have the anti-IS hardcoded within the extension to get it to work as they don't support the required $$script rules. This is a problem since IS seems to be updated pretty often (hence it'd require new extension releases).

But, hopefully, things do change... :)

ghajini commented 7 years ago

So its feature request FOR browser extension - $$ script rules probably fits into milestone 3.0

Does adguard for windows really work? chrome_2017-09-25_23-11-17

anyone guide me, is iam on correct settings of adguard windows

BooBerry commented 7 years ago

Yes, AdGuard for Windows works. But if you read the above, @AdamWr couldn't reproduce IL on that website (tv.com). But, if you want, try adding this rule to the user filter in AdGuard for Windows;

tv.com$$script[tag-content="==typeof t.IXC"][min-length="20000"][max-length="100000"]

Also if you have the IL g00 cookies in your browser cache, you should remove them before retesting this. In fact, I'd recommend clearing the entire browser cache first.

AdamWr commented 7 years ago

If I'm not wrong, this rule will not work in AdGuard 6.1, because there is limit for $$ rules - https://github.com/AdguardTeam/AdguardForWindows/issues/1464 You need to install AdGuard Beta - https://github.com/AdguardTeam/AdguardForWindows/releases

By the way, I can reproduce IL on tv.com with US IP. I will check other two websites and I will add appropriate rules.

ghajini commented 7 years ago

So if there limit for $$ rule ,instart logic can't wait for you,they always update weekly...... Then as per @AdamWr, user has only 1 choice I.e to stick to ublock origin+ubo extra 😒

AdamWr commented 7 years ago

Limit is in AdGuard 6.1, it was fixed in AdGuard 6.2 Beta.

danidoedel commented 7 years ago

@AdamWr Another site:

https://www.livescience.com/

AdamWr commented 7 years ago

Added.

danidoedel commented 7 years ago

@AdamWr And one more:

https://www.space.com/

AdamWr commented 7 years ago

Added.

danidoedel commented 6 years ago

@AdamWr A few more:

AdamWr commented 6 years ago

Added. Thank you.

danidoedel commented 6 years ago

@AdamWr Not working anymore on all these sites: https://github.com/AdguardTeam/AdguardFilters/blob/e4b850ebca8df17f7b161bd78a9520f617310d4a/EnglishFilter/sections/antiadblock.txt#L116

New site missing:

BooBerry commented 6 years ago

I think https://www.msn.com/ (or parts of it) might be using IL now - I just found g00 MSN cookies in my two Chrome browser caches.

AdamWr commented 6 years ago

Fixed - msn.com, livescience.com, newsarama.com, space.com, tomsguide.com, tomshardware.com, tomshardware.co.uk, tomshardware.de, tomshardware.fr Added - laptopmag.com

danidoedel commented 6 years ago

@AdamWr Missing site:

http://opshead.com/

AdamWr commented 6 years ago

Thank you, added.

danidoedel commented 6 years ago

@AdamWr New sites:

AdamWr commented 6 years ago

Added. Thank you.

danidoedel commented 6 years ago

@AdamWr Some sites using abd.html_streaming:

AdamWr commented 6 years ago

Added. Thank you.

ghajini commented 6 years ago

@okiehsch, new sites, see above

danidoedel commented 6 years ago

@AdamWr New site:

AdamWr commented 6 years ago

Added. Thank you.

danidoedel commented 6 years ago

@AdamWr New sites:

AdamWr commented 6 years ago

Added.

danidoedel commented 6 years ago

@AdamWr New site:

AdamWr commented 6 years ago

Added. Thank you.