jspenguin2017 / uBlockProtector

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

socketloop.com #366

Closed lain566 closed 7 years ago

lain566 commented 7 years ago

Test link (required):

https://www.socketloop.com/tutorials/how-to-show-different-content-from-website-server-when-adblock-is-detected

https://www.socketloop.com/blogs/check-out-gal-gadot-s-intense-workout-for-wonder-woman

Screenshot of the web page (required):

check_out_gal_gadot s_intense_workout_for_wonder_w_2017-07-09_20-52-34

Screenshot of the console (press F12 to bring up the console) (required):

developer_tools_-_httpswww socketloop comblogs_2017-07-09_20-54-38

lain566 commented 7 years ago

Section not showing https://www.socketloop.com/tutorials/android-studio-highlight-imagebutton-when-pressed-on-example

more: https://www.socketloop.com/tutorials

jspenguin2017 commented 7 years ago

Hum... it shows for a second and it collapses.

lain566 commented 7 years ago

It's broken again

jspenguin2017 commented 7 years ago

Fixed. They renamed content to cootent...

lain566 commented 7 years ago

@jspenguin2017 It's broken. They changed something again.

https://socketloop.com/tutorials/nginx-web-server-go

jspenguin2017 commented 7 years ago

Fixed.

lain566 commented 7 years ago

It's broken.

jspenguin2017 commented 7 years ago

These two websites are going after us...

lain566 commented 7 years ago

@jspenguin2017 yep, lolalytics still not working for me.

jspenguin2017 commented 7 years ago

I thought I fixed it...

lain566 commented 7 years ago

They can see where their visitors come from any more. Maybe that's why they know us.

jspenguin2017 commented 7 years ago

Yea... The referrer header...

lain566 commented 7 years ago

@jspenguin2017 lolalytics has done it again.

jspenguin2017 commented 7 years ago

They are so annoying...

lain566 commented 7 years ago

It's broken again :sob:

https://www.socketloop.com/tutorials/cloudflare-another-way-to-get-visitor-s-real-ip-address

jspenguin2017 commented 7 years ago

Eh, this is sticky...

lain566 commented 7 years ago

broken

lain566 commented 7 years ago

It's broken again

jspenguin2017 commented 7 years ago

Do they have a meme in their console before? f1fce183f0637084fd1a5170a495aac4ade56aa3

lain566 commented 7 years ago

That is new, I think.

lain566 commented 7 years ago

Still not working for me

jspenguin2017 commented 7 years ago

It's getting complex real fast...

lain566 commented 7 years ago

Have you thought about using whitelist?

jspenguin2017 commented 7 years ago

It's testing multiple ads servers.

lain566 commented 7 years ago

They will never give up. :anguished: https://github.com/reek/anti-adblock-killer/issues?utf8=%E2%9C%93&q=socketloop https://adblockplus.org/forum/viewtopic.php?f=1&t=48436 https://www.facebook.com/socketloop/posts/655086711287929

Can user stylesheet help us with this?

lain566 commented 7 years ago

Have you fixed it?

jspenguin2017 commented 7 years ago

I think I did, do you have a link that does not work?

jspenguin2017 commented 7 years ago

I wasn't expecting them to do it, but they are now checking if fetch works, and that is going to break some compatibility. Old Apple devices won't be able to properly display the content. Unless they are checking user agent on server side, it's a risky move. image

Also they added some JSFuck code that evaluates to "huh". Not sure what they are trying to do.

lain566 commented 7 years ago

Does not work for me on the first load, works if I refresh the page, works irregularly https://www.socketloop.com/tutorials/how-to-show-different-content-from-website-server-when-adblock-is-detected

They are worse than lolalytics

jspenguin2017 commented 7 years ago

Can't reproduce, it works perfectly for me, even in incognito mode.

lain566 commented 7 years ago

It's broken.

jspenguin2017 commented 7 years ago

"Just add more obfuscation", their code looks more and more like BetterJsPop's code... The only thing left is to add console detection.

uBlock-user commented 7 years ago

This guy reminds me of BAB, the dev kept adding more obfuscation in hopes that it will make it harder and difficult which only made it worse for him.

uBlock-user commented 7 years ago

I can reproduce. Use ||socketloop.com^$inline-script Works fine.

jspenguin2017 commented 7 years ago

That does not work fine, the content format is not loading.

uBlock-user commented 7 years ago

Where ?

jspenguin2017 commented 7 years ago

With inline script blocking: image

Expected: image

uBlock-user commented 7 years ago

That's the inline CSS, inline script won't block that.

jspenguin2017 commented 7 years ago

No it's not, it sends an XHR to load the real content and replace the placeholder.

uBlock-user commented 7 years ago

Well this works - socketloop.com##script:inject(setTimeout-defuser.js) I haven't been able to pinpoint which setTimeout call to be precise.

jspenguin2017 commented 7 years ago

Doesn't work for me. Their detection already covered these trivial solutions.

uBlock-user commented 7 years ago

You might have to refresh and remove cookies. This website is another pain in the ass. It has been patched more than 5 times already that's why they have come so far.

jspenguin2017 commented 7 years ago

Still doesn't. The last solution is this:

if (a.debugMode && a.domCmp(["socketloop.com"])) {
    //Issue: https://github.com/jspenguin2017/uBlockProtector/issues/366
    a.readOnly("epmads_block", false);
    a.readOnly("DMAds", true);
    a.inject(() => {
        "use strict";
        const _fetch = window.fetch;
        const re = /^https?:\/\//;
        const newFunc = (url, ...rest) => {
            if (re.test(url)) {
                return new window.Promise(() => { });
            } else {
                return _fetch.call(window, url, ...rest);
            }
        };
        window.Object.defineProperty(window, "fetch", {
            configurable: false,
            set() { },
            get() {
                return newFunc;
            },
        });
    });
    /*
    a.antiCollapse("innerHTML", (ignored, val) => {
        return !realVal.trim();
    });
    a.antiCollapse("innerText", (ignored, val) => {
        return !val.trim();
    });
    */
    a.replace(() => {
        this.addEventListener("readystatechange", () => {
            if (this.readyState === 4 && this.status !== 200) {
                window.Object.defineProperties(this, {
                    "responseText": {
                        configurable: false,
                        set() { },
                        get() {
                            return "Connection Established";
                        },
                    },
                    "status": {
                        configurable: false,
                        set() { },
                        get() {
                            return 200;
                        },
                    },
                    "statusText": {
                        configurable: false,
                        set() { },
                        get() {
                            return "OK";
                        },
                    },
                });
            }
        });
    });
}

It's not going to be patchable with just one trivial filter. I obviously tried all those obvious solutions, but nothing worked.

jspenguin2017 commented 7 years ago

OK, I got it.

uBlock-user commented 7 years ago

Yes and I did it. I checked it on two or three articles and it worked and then it didn't and on a fresh again it worked.

Also it's not just a one line filter it's defuses all setTimeout calls.

jspenguin2017 commented 7 years ago

Test link is here: https://www.socketloop.com/tutorials/how-to-show-different-content-from-website-server-when-adblock-is-detected

Basically everything under tutorials/

uBlock-user commented 7 years ago

They already patched your solution once, they will do it again, they're desperate.

uBlock-user commented 7 years ago

Yes I tested it there myself. It works for me.

lain566 commented 7 years ago

It's broken again...

uBlock-user commented 7 years ago

Yeah content formatting is broke, they will never stop.