Skip bloatware/malware pages from malicious adv-based URL shorteners

Roccobot

New Member
Basically, a feature I recently discovered in uBlock Origin which I use at work: really handy (also improves security a lot), so I'd like to have the same in Adguard. Don't know if it's just a filter thing or if it has to be implemented specifically as a feature. Anyway, I enabled all the uBlock filters lists in Adguard and it doesn't seem to work.

The following is the best example I could find.
If you open this page*, then you click on Download, you completely bypass the gloyah.net ad-filled page (which usually opens a lot of popups and stuff). With Adguard, I need to whitelist some of those domains in order to proceed, then wait for the countdown to turn into the 'Next' button, then click and cross my fingers (sometimes an ugly fullscreen mobile game ad appears thanks to the whitelisting).

* (it takes you to the download of a fansubbed show, hosted in Italy where it's 100% legal, so I hope I can use it as an example here)

Is it possible to have the same enhancement in Adguard? It would be awesome.
 

Boo Berry

Moderator + Beta Tester
Moderator
Anyway, I enabled all the uBlock filters lists in Adguard and it doesn't seem to work.
That's because AdGuard doesn't support uBlock Origin's extended syntax for filters... yet. I say yet because that's coming through Scriptlets, meaning you'll be able to use uBlock Origin filters that uses extended syntax in AdGuard for Windows, AdGuard for Mac and AdGuard for Android. Experimental support landed recently in the AdGuard Adblocker browser extensions.

Scriptlets: https://github.com/AdguardTeam/Scriptlets
Compatibility: https://github.com/AdguardTeam/Scriptlets#compatibility
 

Roccobot

New Member
That's because AdGuard doesn't support uBlock Origin's extended syntax for filters... yet. I say yet because that's coming through Scriptlets, meaning you'll be able to use uBlock Origin filters that uses extended syntax in AdGuard for Windows, AdGuard for Mac and AdGuard for Android. Experimental support landed recently in the AdGuard Adblocker browser extensions.

Scriptlets: https://github.com/AdguardTeam/Scriptlets
Compatibility: https://github.com/AdguardTeam/Scriptlets#compatibility
Thank you! So I'm assuming your answer means the thing is achieved 'just' by filters with extended syntax?
 

Roccobot

New Member
I see it's way more complicated than I thought
Hope the community will come to help basic users with the scriplets, they seem very powerful!
 
Last edited:

Adam

Filters Developer
Staff member
Moderator
I think that you can use the same script which uBlock Origin is using to bypass gloyah.net timer/ads, but with AdGuard syntax.
If you add this rule to user filter it should skip timer/ads:
Code:
gloyah.net#%#(function(){var f=/^\d$/;try{var g,h=!0;Object.defineProperty(window,"ysmm",{configurable:!1,set:function(d){if(h){h=!1;try{if("string"===typeof d){var c="",e="",a;for(a=0;a<d.length;a++)0===a%2?c+=d.charAt(a):e=d.charAt(a)+e;var b=(c+e).split("");for(a=0;a<b.length;a++)if(f.test(b[a]))for(c=a+1;c<b.length;c++)if(f.test(b[c])){var k=parseInt(b[a],10)^parseInt(b[c],10);10>k&&(b[a]=k.toString());a=c;break}b=b.join("");var l=window.atob(b).slice(16,-16);window.stop();window.onbeforeunload=null;window.location.href= l}}catch(m){}}g=d},get:function(){return g}})}catch(d){window.console.error("Failed to set up Adfly bypasser!")}})();
 

Roccobot

New Member
I think that you can use the same script which uBlock Origin is using to bypass gloyah.net timer/ads, but with AdGuard syntax.
If you add this rule to user filter it should skip timer/ads:
Code:
gloyah.net#%#(function(){var f=/^\d$/;try{var g,h=!0;Object.defineProperty(window,"ysmm",{configurable:!1,set:function(d){if(h){h=!1;try{if("string"===typeof d){var c="",e="",a;for(a=0;a<d.length;a++)0===a%2?c+=d.charAt(a):e=d.charAt(a)+e;var b=(c+e).split("");for(a=0;a<b.length;a++)if(f.test(b[a]))for(c=a+1;c<b.length;c++)if(f.test(b[c])){var k=parseInt(b[a],10)^parseInt(b[c],10);10>k&&(b[a]=k.toString());a=c;break}b=b.join("");var l=window.atob(b).slice(16,-16);window.stop();window.onbeforeunload=null;window.location.href= l}}catch(m){}}g=d},get:function(){return g}})}catch(d){window.console.error("Failed to set up Adfly bypasser!")}})();
Amazing, it seems to work! But for some reason only if I add it as a 'local' filter (in the Adguard for Mac Preferences pane). If I add it to my remote TXT file I use to sync my rules between my different devics it won't work o_O
 

Adam

Filters Developer
Staff member
Moderator
If I add it to my remote TXT file I use to sync my rules between my different devics it won't work
I don't have MacOS, so I'm not sure how it looks like in AdGuard for Mac, but if I'm not wrong in AdGuard for Windows from version 7 is necessary to mark filters as trusted to make JavaScript/$replace rules work.
upload_2019-6-3_13-54-26.png
I guess that the same is necessary in AdGuard for Mac.
 

Roccobot

New Member
I don't have MacOS, so I'm not sure how it looks like in AdGuard for Mac, but if I'm not wrong in AdGuard for Windows from version 7 is necessary to mark filters as trusted to make JavaScript/$replace rules work.
I guess that the same is necessary in AdGuard for Mac.
Yeah, I added my 'remote' filter list as a trusted source, but I see at the next boot it lost his 'trusted' mark. Could this be a bug?
 

Roccobot

New Member
Actually, I double checked: it losts its mark immediately: I add my filter from URL, click 'Next', confirm and my 'Roccobot Filters' list is marked as trusted.
I close then reopen the Preferences pane and the mark is gone and the extended syntax doesn't work (screenshots in sequence).

Side question: I didn't add @@||hbl.local$document in my custom user filters list.. is it something that the application adds by itself?
 

Blaz

Moderator & Translator
Staff member
Moderator
If you add this rule to user filter it should skip timer/ads:
Code:
gloyah.net#%#(function(){var f=/^\d$/;try{var g,h=!0;Object.defineProperty(window,"ysmm",{configurable:!1,set:function(d){if(h){h=!1;try{if("string"===typeof d){var c="",e="",a;for(a=0;a<d.length;a++)0===a%2?c+=d.charAt(a):e=d.charAt(a)+e;var b=(c+e).split("");for(a=0;a<b.length;a++)if(f.test(b[a]))for(c=a+1;c<b.length;c++)if(f.test(b[c])){var k=parseInt(b[a],10)^parseInt(b[c],10);10>k&&(b[a]=k.toString());a=c;break}b=b.join("");var l=window.atob(b).slice(16,-16);window.stop();window.onbeforeunload=null;window.location.href= l}}catch(m){}}g=d},get:function(){return g}})}catch(d){window.console.error("Failed to set up Adfly bypasser!")}})();
Added to Annoyances filter (tweaks). Update available in about 3 hours.
 
Top