New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anti Adblock hidden inside a legit script - [Geo Locked Website] #381

Closed
leewdch opened this Issue Apr 27, 2017 · 12 comments

Comments

Projects
None yet
5 participants
@leewdch

leewdch commented Apr 27, 2017

URL(s) where the issue occurs

https://www.vvvvid.it/#!show/412/owarimonogatari

Describe the issue

I'm forced to disable uBlock on this website otherwise the page will turn into a warning page with no content inside. Everything is managed dynamically via script so I can't simply disable the script where's the anti-adblock otherwise the whole site won't work.

Screenshot(s)

0ualz5s

Versions

  • Browser/version: Firefox 53.0
  • uBlock Origin version: 1.12.1

Settings

  • Enabled cloud saves.
  • Enabled advanced mode.
  • Enabled Anti Adblock Removal List.
  • Enabled Anti-Adblock Killer - Reek.
  • Enabled EasyList for my country.
  • Added custom rule for a news website in my filters.
  • Added three youtube channels to my whitelist.
  • I'm also using Anti-Adblock Killer userscript alongside the feature enabled in the Filters List tab.

Notes

A guy not living in my country tried to help me but the website won't let you access if your IP isn't Italian. Maybe you can use a proxy but I'll link here the script with the Anti-Adblock function: https://static.vvvvid.it/js/vvvvid.js?v=1.0.7100a

@uBlock-user

This comment has been minimized.

Member

uBlock-user commented Apr 27, 2017

Try vvvvid.it##script:inject(setTimeout-defuser.js, window.location)

@leewdch

This comment has been minimized.

leewdch commented Apr 27, 2017

nope, it didn't work but thanks for trying :)

@uBlock-user

This comment has been minimized.

Member

uBlock-user commented Apr 27, 2017

Try vvvvid.it##script:inject(abort-on-property-read.js, isAdBlockActive)

OR

vvvvid.it##script:inject(abort-on-property-write.js, isAdBlockActive)

@uBlock-user

This comment has been minimized.

Member

uBlock-user commented Apr 27, 2017

I cannot test it as the entire website is Access Denied for me. Also remove all cache and cookies when you test each filter.

@mapx-

This comment has been minimized.

Contributor

mapx- commented Apr 27, 2017

The filters above don't work.

add

@@||des.smartclip.net/ads$domain=imasdk.googleapis.com,third-party
@@||ads.mperience.net/vast$domain=imasdk.googleapis.com,third-party
||flashondemand.top-ix.org^$domain=imasdk.googleapis.com,third-party

from
https://forums.lanik.us/viewtopic.php?p=116023#p116023

working for me

@leewdch

This comment has been minimized.

leewdch commented Apr 27, 2017

I'll paste a copy of the anti adblock function in the main script of the website here just for convenience:

this.cab3 = function(k, n) {
        var o = this;
        var q = function(r) {
            o.isAdBlockActive = r;
            if (n) {
                n(r)
            }
            if (r && k) {
                setTimeout(function() {
                    window.location = "adblock.html"
                }, 500)
            }
        };
        if (!window.google || !window.google.ima) {
            q(true)
        } else {
            var c = this.randomId(10);
            var p = "//static.vvvvid.it/img/ad/adv2.jpg?id=" + c;
            var e = "//static.vvvvid.it/img/ad/advertisement.xml?id=" + c;
            var d = true;
            if (d) {
                $.ajax(e, {
                    dataType: "xml",
                    success: function(r) {
                        q($(r).find("VAST").length == 0)
                    },
                    error: function() {
                        q(true)
                    }
                })
            } else {
                var g = $(document.createElement("IMG")).attr({
                    src: p,
                    id: "img" + c
                }).css({
                    display: "block",
                    width: "1px",
                    height: "1px",
                    position: "absolute",
                    top: "-10px",
                    left: "-10px"
                });
                var f = $("<img id='adbimg2' src='//static.vvvvid.it/img/pic01.jpg?id=" + c + "'/>");
                f.css({
                    position: "absolute",
                    top: "-10px",
                    left: "-10px"
                });
                var b = 0;
                var h = function(r) {
                    ++b;
                    a(r.target)
                };
                var m = function(r) {
                    a(r.target)
                };
                var j = [];
                var a = function(r) {
                    if (j.length === 0) {
                        j.push(r);
                        return
                    }
                    if (j.length === 1 && j[0] === r) {
                        return
                    }
                    j.push(r);
                    setTimeout(function() {
                        var s = "#img" + c;
                        var w = $(s);
                        var x = $("#adbimg2");
                        var v = MPImg.getDimensions(w.get(0));
                        try {
                            if (b < 2 && ($(s).length === 0 || $(s).css("display") === "none" || (v != null && (v.w != 2 || v.h != 3)))) {
                                q(true);
                                w.remove();
                                x.remove();
                                return
                            }
                            q(false);
                            w.remove();
                            x.remove()
                        } catch (u) {
                            vvvvid.exception("AdBlock", u)
                        }
                    }, 500)
                };
                var l = function(r) {
                    $("body").append(r);
                    if (r.get(0).complete) {
                        a(r.get(0))
                    } else {
                        r.load(m).error(h)
                    }
                };
                l(g);
                l(f)
            }
        }
    };
@leewdch

This comment has been minimized.

leewdch commented Apr 27, 2017

@mapx- how did you manage to find those addresses? just a google research? I'm wondering how can I learn to manage these occurrences on my own

@gorhill

This comment has been minimized.

Member

gorhill commented Apr 27, 2017

@uBlock-user

Try vvvvid.it##script:inject(setTimeout-defuser.js, window.location)

Two things:

  • never use window. for abort-on-property, it is implicit -- currently uBO scriplet interpret your property as window.window.location;
  • window.location is read-only, cannot be overwritten.
@uBlock-user

This comment has been minimized.

Member

uBlock-user commented Apr 27, 2017

never use window. for abort-on-property, it is implicit

Thanks, wasn't aware of that.

@jspenguin2017

This comment has been minimized.

Contributor

jspenguin2017 commented May 17, 2017

@gorhill But setTimeout-defuser.js can accept anything as the argument.

@gorhill

This comment has been minimized.

Member

gorhill commented May 17, 2017

@jspenguin2017 That's right, my bad. Brain lapse, I had abort-on-property-[read|write].js in mind when I wrote this.

@uBlock-user disregard my comment above re setTimeout-defuser.js.

@mapx-

This comment has been minimized.

Contributor

mapx- commented Nov 25, 2017

@@||ads.mperience.net/vast?$xmlhttprequest,domain=imasdk.googleapis.com
@@||s0.2mdn.net/instream/video/client.js$script,domain=vvvvid.it
||flashondemand.top-ix.org/video-omg/vvvvid/Roll/

@mapx- mapx- closed this Mar 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment