Jump to content
Tuts 4 You
LCF-AT

ABP gets detected - How to prevent?

Recommended Posts

LCF-AT

Hi again,

so in the time I did study a lot of uBO & ABP filters to get more advanced and how to use & add them correctly manually.Its also hard to find examples about it on internet.I also still working on that n-tv live tv stream (with enabled flash) issue to get it run with bypassing the commercial clips but still without success.After checking again the internet for that site I found some infos but for ADGUARD addon (I dont use) but there I am not sure whether all filter syntax are also same as for uBO / ABP etc like the filter to repleace infos in loaded java scripts.

https://forum.adguard.com/index.php?threads/resolved-n-tv-de.7836/

||cdn.videoplaza.tv/contrib/de-ipd/svm/homadConfigVideoplaza-n-tv.json$replace=/"enabled": true\,/"enabled": false\,/i,domain=n-tv.de

n-tv.de/$replace=/abcheck_enabled: "1"/abcheck_enabled: "0"/
-----------
(http://bilder1.n-tv.de/resources/06604919/js/jquery.ntv.js)
// set default params
var params = {
abcheck_enabled: "1",

https://forum.adguard.com/index.php?threads/n-tv-adblock-detection.6141/

It dosent seems to work using it in uBO and still get commercial clips before.

uBO has also a syntax for script:inject(...) to inject functions from a resources file....

https://github.com/uBlockOrigin/uAssets/blob/master/filters/resources.txt

In some filters I can see some like that..

forbes.com##script:inject(forbes-defuser.js)
--------------------------------------------
# https://news.ycombinator.com/item?id=10814913
forbes-defuser.js application/javascript
(function() {
	if ( window.location.pathname.lastIndexOf('/forbes/welcome/', 0) !== 0 ) {
		return;
	}
	document.cookie = 'welcomeAd=true';
	window.addEventListener('load', function() {
		// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#Example_2_Get_a_sample_cookie_named_test2
		var toURL = document.cookie.replace(/(?:(?:^|.*;\s*)toURL\s*\=\s*([^;]*).*$)|^.*$/, "$1");
		if ( toURL.lastIndexOf('http', 0) === 0 ) {
			window.location.replace(toURL);
		}
	});
})();

...so I am not common with Java script functions.

So what I see is that I need to change that abcheck_enabled: "1", to 0 in that java script (dont know how to do that with uBO yet) and or same with the JSON file from videoplaza to false to prevent loading the commercial clips from these damoh servers.

http://cdn.videoplaza.tv/contrib/de-ipd/svm/homadConfigVideoplaza-n-tv.json
----------------------------------------------------------------------------
{
    "enabled": true,  <--- this
    "server": [
        "http://[hash].1.damoh.n-tv.de/",
        "http://[hash].2.damoh.n-tv.de/",
        "http://[hash].3.damoh.n-tv.de/"
    ],
    "alias": "deipdvideoplazatv",
    "adpath": "",
    "blockForCookies": false,
    "disablecookietest": true,
    "config": "http://homad-global-configs-eu-fra.schneevonmorgen.com.s3.amazonaws.com/www.n-tv.de/config.json"
}

Now I woulld like to ask whether anybody could help with some infos using uBO or optional Tampermonkey script to get this working to bypass the commercial clips at the end of this site.....

http://www.n-tv.de/mediathek/livestream/n-tv-live-article9511936.html

...so thats the main goal to get it work with uBO.So I dont care about that stream itself so far and just interested into uBO itself + manually handling itself.The HDS stream you can simple find & use with any streamer tool or HDS player on internet to watch it etc like this...

https://www.ideaweb.it/eng/FlashMediaPlayback.swf?src=http://p.live.akamai.n-tv.de/hds-live/ntvlive/ntvlive_1500.f4m

...you know.Would be nice if there some advanced uBO users on this forum how could maybe help a little so that I can get better to build own filters for myself later.

greetz

Share this post


Link to post
Share on other sites
LCF-AT

Hi guys,

I am still playing with UBO and trying do understand how to use some custom filters like script:contains & script:inject.First problem is that I cant see whether the set filter was used or not in the UBO logger = no infos about inject / contains moddings.In the UBO filter list itself I can see some sites using that filters and found one I did check out.The filter is set so...

layer13.net##script:contains(adBlockDetected)

...but this filter has no effect and ADB message pops up on that example site.In the page source of this site I can find that infos...

        <script>var fornicationAdBlock = undefined;</script>

        <script src="js/testing312.js" type="application/javascript"></script>

        
        <script>

            var adBlockDetected = function() {
                //$('#Wyl2LCOlC9YicUHsfgGy').removeClass('alert-info alert-success').addClass('alert-danger');

                $('#Wyl2LCOlC9YicUHsfgGy').modal({
                    show: true,
                    keyboard: false,
                    backdrop: true
                })


            }

            var adBlockUndetected = function() {
               // $('#Wyl2LCOlC9YicUHsfgGy').removeClass('alert-info alert-danger').addClass('alert-success').text('AdBlock undetected =)');
            }


            if(typeof fornicationAdBlock === 'undefined') {
                $(document).ready(adBlockDetected);
            } else {
                fornicationAdBlock.debug.set(false).on(true, adBlockDetected).on(false, adBlockUndetected);
            }

            $(document).ready(function() {
                $('#check-again').click(function() {
                    $('#Wyl2LCOlC9YicUHsfgGy').removeClass('alert-success alert-danger').addClass('alert-info').text('Checking...');
                    if(typeof fornicationAdBlock === 'undefined') {
                        setTimeout(function() {// Just serves to make visible checking
                            adBlockDetected();
                        }, 100);
                    } else {
                        fornicationAdBlock.check();
                    }
                });
            });
        </script>

So first question I have is why the filter "layer13.net##script:contains(adBlockDetected)" dosent work in that case?Maybe anyone can explain that a little if possible.

I also checked the script testing312.js which gets loaded from that code (fornicationAdBlock 4.0.0-beta.3) and in UBO resources txt file I also can find a code snipped / function for that called "fornicationadblock.js-3.2.0"

# fornicationadblock defuser
fornicationadblock.js-3.2.0 application/javascript
(function() {
	var noopfn = function() {
		;
	};
	//
	var Fab = function() {};
	Fab.prototype.check = noopfn;
	Fab.prototype.clearEvent = noopfn;
	Fab.prototype.emitEvent = noopfn;
	Fab.prototype.on = function(a, b) {
		if ( !a ) { b(); }
		return this;
	};
	Fab.prototype.onDetected = function() {
		return this;
	};
	Fab.prototype.onNotDetected = function(a) {
		a();
		return this;
	};
	Fab.prototype.setOption = noopfn;
	var fab = new Fab(),
		getSetFab = {
			get: function() { return Fab; },
			set: function() {}
		},
		getsetfab = {
			get: function() { return fab; },
			set: function() {}
		};
	if ( window.hasOwnProperty('fornicationAdBlock') ) { window.fornicationAdBlock = Fab; }
	else { Object.defineProperty(window, 'fornicationAdBlock', getSetFab); }
	if ( window.hasOwnProperty('BlockAdBlock') ) { window.BlockAdBlock = Fab; }
	else { Object.defineProperty(window, 'BlockAdBlock', getSetFab); }
	if ( window.hasOwnProperty('SniffAdBlock') ) { window.SniffAdBlock = Fab; }
	else { Object.defineProperty(window, 'SniffAdBlock', getSetFab); }
	if ( window.hasOwnProperty('fornicationAdBlock') ) { window.fornicationAdBlock = fab; }
	else { Object.defineProperty(window, 'fornicationAdBlock', getsetfab); }
	if ( window.hasOwnProperty('blockAdBlock') ) { window.blockAdBlock = fab; }
	else { Object.defineProperty(window, 'blockAdBlock', getsetfab); }
	if ( window.hasOwnProperty('sniffAdBlock') ) { window.sniffAdBlock = fab; }
	else { Object.defineProperty(window, 'sniffAdBlock', getsetfab); }
})();

Now I tried to use script:inject filter and redirect too like this...

layer13.net##script:inject(fornicationadblock.js-3.2.0)
or
||layer13.net/*/testing312.js$script,redirect=fornicationadblock.js-3.2.0,important

...and both seems to work with inject or redirect.So in both cases I dont see any infos in the logger of UBO to check whether one of the filter was used or not etc you know.I also dont check yet why the injection of that code above does work in that case.I cant also find  any detailed description about script:inject / script:contains filters or example tuts etc also not about the script functions of the resources file.Maybe anyone could tell something about it if you are also work with UBO filters / JAVA etc.

greetz

Share this post


Link to post
Share on other sites
Mex

hello LCF-AT , i reviewed many of your publications, could you elaborate a bypass for enigma, I am willing to pay for the time invested.

Share this post


Link to post
Share on other sites
LCF-AT

@Mex

So I dont work anymore on any protector to unpack / bypass / script etc.I am also not sure whether I will do it again in the future or not and at the moment I have other interests.Maybe you ask again on any Enigma topic or build any UnpackMe's which you can't handle anymore and see what feedback you get.

 

So about script:inject filters....so I tried again...so you do remember that site I did post before where UBO did fail with using Anti-AddBlock-Killer by Reek in UBO?

Only with using Tampermonkey it did work with same script.Now I tried it again only using UBO with inject script and found 2 possible script I can use...

Spoiler

antiblock.org##script:inject(setTimeout-defuser.js)
or
antiblock.org##script:inject(overlay-buster.js)

First one is better.I also have seen that you get a ADBlock message on that site if you dont use UBO whats strange but in webconsole I see that Firefox does block mixed contents by itself for https connections.Just if you disable it (about:config) or load the site via http then it works.Just only a info.

Another site I have testet....

...in private mode of Firefox (prevent some trackings = ADB message) and found that script I could use...

Spoiler

blockadblock.com##script:inject(setInterval-defuser.js)

...but only problem with that is that the site header animation dosent work by itself now anymore but its also not so important of course.Anyway,so I see you guys are not really into that filter stuff right?Anyway,so it seems I just discuss with myself only on this topic. :)

greetz

Share this post


Link to post
Share on other sites
kao

Personally, I'm against all ads on webpages I visit on a regular basis. So, I do make whatever filters I need to make *my* life better. 

But you're trying to use a very specific filter feature that works only with that specifc adblocker and only on Firefox. How many people will have the same settings and knowledge to help you? Very few.. ;)

 

  • Like 1

Share this post


Link to post
Share on other sites
LCF-AT

Hi kao,

so I hate that ADS / popup / Redirect / Tracking & more too and wanna handle that to prevent such dirt if I visit any sites using such stuff.I also decided to use UBO AddOn where I have more features I can use to prevent unintentional stuff.I like UBO and would like to understand all filters I can use for 100 % but the documentry is not complet specially for that inject stuff.Thats bad and I can only check that manually again & again and trying to check the sites out to understand the page source code & JAVA too.Not so easy to get more advanced and I just keep trying / testing (lerning by doing) etc. :) Yes it seems there are really mot much people around using my settings and could tell something more about it or exchange infos etc.Really a pitty.

greetz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×