jspenguin2017 / uBlockProtector

An anti-adblock defuser for Nano Adblocker and uBlock Origin
GNU General Public License v3.0
740 stars 83 forks source link

codepo8.github.io #243

Closed ale5000-git closed 7 years ago

ale5000-git commented 7 years ago

Is it possible to add a generic "bypasser" for this type of ad block detection?

Test link: https://codepo8.github.io/detecting-adblock/

Ref: https://github.com/codepo8/detecting-adblock/

uBlock-user commented 7 years ago

Why ? Is it being detected on your side ?

uBlock-user commented 7 years ago

Can you provide a use-case where it's being used by a website ?

ale5000-git commented 7 years ago

If you go here and refresh the page you see "AdBlock is enabled". Sometimes it doesn't appears on first run.

uBlock-user commented 7 years ago

Yes, I already saw that and the script being used is also a CSS bait which is easy to patch. Let me show you.

(function(){
  var test = document.createElement('div');
  test.innerHTML = ' ';
  test.className = 'adsbox';
  document.body.appendChild(test);
  window.setTimeout(function() {
    if (test.offsetHeight === 0) {
      document.body.classList.add('adblock');
    }
    test.remove();
  }, 100);
})();

As you can see it's checking whether a class named adsbox is created or not. If created, then ads are allowed or if not, adblocker is on, that's the logic.

adsbox is a class name which was taken from Easylist and can be easily changed too, so patching it globally won't help as the webmasters will use another class and it can go on, so patching globally won't work as you expect.

This is why I asked a use-case, what you provided is the proof-of-concept on that github.io domain.

ale5000-git commented 7 years ago

Currently I haven't found a site that use it, but I will report if I will found it. I just opened the issue just in case it could be patched globally, if it isn't possible feel free to close the issue.

ale5000-git commented 7 years ago

@Dibbyo456: You should open a separate issue.

harryqt commented 7 years ago

@ale5000-git it's not actually a uBlock detection issue, so I thought asking it here would be ok.

uBlock-user commented 7 years ago

It's not needed globally but that will be decided by @jspenguin2017 if such a case comes by.

What I'm saying is it would be futile to create a global patch for something that will not work as these classes can be changed as variables, so just report the websites and they will be patched.

uBlock-user commented 7 years ago

@Dibbyo456 That's a third-party ad playing, report it to Easylist first and if they don't block it then on uAssets and gorhill will block it.

uBlock-user commented 7 years ago

Incase if you want to block it yourself ||vzaar.com^$third-party, also don't hijack issues like this again, open a separate issue with relevant details.

jspenguin2017 commented 7 years ago

@Dibbyo456 Do not ask off topic questions here, that looks like an ad more than something else, you should report it to EasyList.

jspenguin2017 commented 7 years ago

I don't think we can really make this generic, as they can easily change the test element. This trick is used rather frequently, but unfortunately, we have to solve it case by case.

I'll patch their test page.

jspenguin2017 commented 7 years ago

We are actually going to solve this with forced CSS, since he might have .adsbox on his other pages.

ale5000-git commented 7 years ago

Fixed.