sitexw/FuckAdBlock

Not working with Firefox 46 on Linux

MESWEB opened this issue · 9 comments

This script not working. I have Firefox 46 with uBlock and I see "AdBlock is not enabled" on test page.

You have Adblock or Adblock Plus ?

uBlock

It's normal, they deliberately disable detection on my page...

fuckadblock.sitexw.fr#@#.pub_300x250

So where can I try this script online?

You can return to http://fuckadblock.sitexw.fr/, the example now works.

To be exact, uBlock replaces "fuckadblock.js" by another faulty script, which makes the detection impossible. The solution is to use the attribute "integrity" of the "script" tag that matters FuckAdBlock. Here is an example :

<script src="//cdnjs.cloudflare.com/ajax/libs/fuckadblock/3.2.1/fuckadblock.js" integrity="sha384-8+ntjBhuf/Wf410gZ73ZRUggs/IUF495g5ld6wTBwjbTYW7MhoSMLh6YfDCBxnMA" crossorigin="anonymous"></script>

Now, if the script is compromised, it create an error that causes a positive detection.

For more information on the attribute "integrity", go here:
https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

And the sha384 to easily create a script, go here:
https://www.srihash.org/

So can You explain me how blocker mods recognize this script? By name or content? If I change script name that's not help?

Yes, you can change the name, this will help. But I think that the "integrity" attribute is one of the best solutions, because it validates the authenticity of FuckAdBlock (this method will default recommended in V4).

So what about blocking loading script by mods?

I think you can close this issue. :)

integrity is a nice feature. Thanks for the hint.