gorhill / uBO-Extra

A companion extension to uBlock Origin
GNU General Public License v3.0
654 stars 42 forks source link

onet.pl detects adblock #28

Closed F4z closed 7 years ago

F4z commented 7 years ago

uBlock Origin 1.11.0 uBlock Origin Extra 2.9 Google Chrome 56.0.2924.87

I noticed that if I have enabled uBO + uBO Extra, then this website - http://www.onet.pl/ - detects "adblock", but without uBO Extra it works "properly".

To reproduce.

  1. Disable all filter list
  2. Add these two rules to my filters ||csr.onet.pl^ ||gemius.pl^
  3. Go here - http://www.onet.pl/
  4. You will see that website is asking to disable adblock
    Screenshot image
  5. Disable uBO Extra and reload website
  6. No message to disable adblock

To resolve this problem I can also add these rules: @@||onet.hit.gemius.pl/fpdata.js?href=www.onet.pl$script @@||onet.hit.gemius.pl/xgemius.js$script to my filters and it will work properly, but I wonder why these rules are needed, if without uBO Extra, I do not need them.

gorhill commented 7 years ago

The site is using the name property to find out whether the WebSocket constructor has been wrapped.

F4z commented 7 years ago

It works, thank you for fix and answer.

PrzemyslawKlys commented 7 years ago

It seems the issue is back. Using 2.11. As soon as i disable it onet.pl works fine.

Matthaiks commented 7 years ago

It's still broken.

gorhill commented 7 years ago

I see the site asking to disable the blocker without uBO-Extra, so that's not a uBO-Extra issue.

Using @@||onet.pl^$generichide fixes the detection.

F4z commented 7 years ago

I also can reproduce a problem again. Steps to reproduce in my first post.

I think, that they added something with RTCPeerConnection to their script, because I did not remember that it was before, but I might be wrong.

G = function(a) {
    try {
        if ("WebSocket" !== a.WebSocket.name || a.Object.getOwnPropertyDescriptor(a.Element.prototype, "shadowRoot").get.toString().indexOf("[native code]") < 0 || 0 === a.RTCPeerConnection.name.indexOf("bound") || 0 === a.webkitRTCPeerConnection.name.indexOf("bound")) return !0
    } catch (a) {}
    return !1
}
Rageofhonor commented 7 years ago

I don’t know what onet.pl is doing but they can find out that I use an ad blocking software and they make the text disappear. Instead of the text I get gray blocks. How to solve this?