Website Refuses Ad-Blocked Browsers

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
Kraig
Posts: 1
Joined: Wed May 21, 2008 11:34 pm

Website Refuses Ad-Blocked Browsers

Post by Kraig »

I have not ever known a site refuse an ad-blocked browser before, this is new on me!!

see for yourself!! after a few seconds, you get what is in the screenshot.

http://sepecat.info/b/

here is the screen shot:

Image

and the link to his hmepage is

http://sepecat.info/ , which strangely links back to the first link in this post, and you get the same thing again :?
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post by Ares2 »

You can use this whitelist while browsing on the site:

Code: Select all

@@http://pagead2.googlesyndication.com/pagead/show_ads.js
Wladimir Palant

Post by Wladimir Palant »

This site doesn't really detect Adblock Plus, it can only see that Google ads didn't load. Funny enough, you can just click "Back" on the error page and you will be able to read the page just fine. Generally, these things can only be really "fixed" with a GreaseMonkey script.
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

Wow .. look .. it's the old 'unbeatable' Danny Carlton anti-adblocking code :D. The failure of that code caused a very angry Danny Carlton to instead block ALL Firefox users. What an internet news story THAT was last summer :shock:

I removed the fix from the EasyList after Danny gave up because I didn't think that anyone would ever try to use that script again. Guess I was wrong.

Unless that script tries to make a comeback, I will leave things as they are.
Last edited by rick752 on Thu May 22, 2008 5:36 am, edited 1 time in total.
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post by Ares2 »

Wladimir Palant wrote:these things can only be really "fixed" with a GreaseMonkey script.
Can you give me an example script? Can a script block another one or can it just remove the redirecting or hiding? (I guess I should really learn JS :roll: )
Wladimir Palant

Post by Wladimir Palant »

@Ares2: Something like that should do:

Code: Select all

// ==UserScript==
// @name          sepecat.info Anti-Anti-Adblocker
// @namespace     http://adblockplus.org/forum/viewtopic.php?t=2441
// @description   Disables the anti-adblocking script on sepecat.info
// @include       http://sepecat.info/*
// ==/UserScript==

window.addEventListener("load", function() {
  unsafeWindow.reklama = function(){}
}, false);
Last edited by Wladimir Palant on Thu May 22, 2008 4:05 pm, edited 1 time in total.
Dr. Evil
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Post by Dr. Evil »

I think it should look more like this:

Code: Select all

// ==UserScript==
// @name          sepecat.info Anti-Anti-Adblocker
// @namespace     http://adblockplus.org/forum/viewtopic.php?t=2441
// @description   Disables the anti-adblocking script on sepecat.info
// @include       http://sepecat.info/*
// ==/UserScript==

location.href = "javascript:window.reklama = function(){}";
when just setting unsafeWindow.reklama, the site could use a property setter to access the GM_* functions.
Wladimir Palant

Post by Wladimir Palant »

@Dr.Evil: Right, it should be unsafeWindow - I corrected the code above. As to property setters - I don't think the site can use them to access anything, this vulnerability was closed long ago. Changing window's location on the other hand has undesirable side-effects.
Dr. Evil
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Post by Dr. Evil »

the official greasemonkey wiki says that unsafeWindow *is* unsafe and recommends using location.href: http://wiki.greasespot.net/UnsafeWindow

As far as I know, setting location.href to a javascript uri doesn't have any side effects... it just executes the script, like a javascript: link or a bookmarklet.

There's also a lengthy read on that topic here:
http://www.oreillynet.com/pub/a/network ... falls.html

Maybe XPCSafeJSObjectWrappers are a solution for this problem, but only in Firefox 3.
Wladimir Palant

Post by Wladimir Palant »

Setting window location to a JavaScript URL aborts all loading that is still in progress, stops animated GIFs and probably also clears all timeouts set by JavaScript. So the side-effects are rather numerous. But if one doesn't care, using this approach should indeed be safer, at least with respect to potential not yet discovered security holes in the browser.
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post by Ares2 »

Wladimir Palant wrote:@Ares2: Something like that should do:
Cool, thank you very much, this works (Next step for me is to understand HOW it works :D ).

@Dr. Evil: I just get this when I use your script for this site:
Image
Any ideas what's wrong?
Wladimir Palant

Post by Wladimir Palant »

@Ares2: Should be:

Code: Select all

location.href = "javascript:void(window.reklama = function(){})";
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post by Ares2 »

Wladimir Palant wrote:@Ares2: Should be:

Code: Select all

location.href = "javascript:void(window.reklama = function(){})";
Yes, now it works.

Correct me if I'm wrong but these scripts work for every function x using window.location = "url" ?
Post Reply