Author Topic: URL blocking and wildcards  (Read 10573 times)

0 Members and 1 Guest are viewing this topic.

Cadencia

  • Guest
URL blocking and wildcards
« on: April 13, 2006, 12:44:44 PM »
I though to try and use url blocking to disable those irritating INTELLITXT ads - the ones that make a double underlined link of various keywords in the text.

I tried to block *intellitxt.com, but that failed to have any effect.
I changed it to *.intellitxt.com/* and that seems to be working.

My question is: What are the rules for wildcards? Does each * represent any number of characters up to the next non-* character, or is the "." character excluded somehow?

Why do I need the trailing /*?

Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9408
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: URL blocking and wildcards
« Reply #1 on: April 13, 2006, 12:58:53 PM »
This "?" usually means any character of lenght 1 letter, though cannot be used for URLs.
"*" means anything of any lenght.

So if i use:

http://*.intellitxt.com/*

this means URL can be:

http://srv1.intellitxt.com/*
http://ads.intellitxt.com/*
http://click.intellitxt.com/*

and will still get blocked.

The * in the end means it can be anything behind it:

http://ads.intellitxt.com/banners/txt/intellitxt.js

This way it will block anything thats on intellitxt.com domain regardless of how many subdirectories are used behind and whats the final filename in the end (if any).

Using * is pretty simple and useful.
You can even use */ads/* or */banners/*. This means any URL that contains string /ads/ or /banners/ will get blocked (no matter where this string is placed in URL address. If you want to block just lets say ".ru" domains you use *.ru.
Or if you want to block all EXE/ZIP filetypes you use *.exe or *.zip
So last string will be matched exactly .zip, and * replaces anything of any lenght before this.

Hope it helps :)
Visit my webpage Angry Sheep Blog

hlecter

  • Guest
Re: URL blocking and wildcards
« Reply #2 on: April 13, 2006, 01:15:54 PM »
RejZoR,

Thanks for a very good explanation.

In my opinion this feature of Avast should be used much more.  :)

HL

Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9408
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: URL blocking and wildcards
« Reply #3 on: April 13, 2006, 01:24:22 PM »
Though i prefer Firefox Adblock extension to block the ads and similar garbage.
Much faster and more flexible. Though avast! does that job aswel :)
Visit my webpage Angry Sheep Blog

hlecter

  • Guest
Re: URL blocking and wildcards
« Reply #4 on: April 13, 2006, 01:32:28 PM »
I am on Opera and IE. Opera also has such a feature.
But when switching browsers, I have to rely on Hostfile.

What I meant was that Avast blocking feature is a very powerful feature,
and not much promoted IMO.

Your post was a good promotion. :)
HL

greenhatch

  • Guest
Re: URL blocking and wildcards
« Reply #5 on: April 13, 2006, 01:57:27 PM »
RejZor said:
''You can even use */ads/* or */banners/*. This means any URL that contains string /ads/ or /banners/ will get blocked (no matter where this string is placed in URL address.''


If I understand that adding those strings to URL blocking would stop most banners and ads loading, without actually hindering the opening of the main site page itself, that'll be great!  Sorry if I implied too much.

Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9408
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: URL blocking and wildcards
« Reply #6 on: April 13, 2006, 02:32:52 PM »
Yeah, something like that. Though avast! was not designed exactly for this hehe
Visit my webpage Angry Sheep Blog

greenhatch

  • Guest
Re: URL blocking and wildcards
« Reply #7 on: April 13, 2006, 03:00:09 PM »
Yeah, something like that. Though avast! was not designed exactly for this hehe


Oops, better hide the posts from Igor and Vlk.

Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9408
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: URL blocking and wildcards
« Reply #8 on: April 13, 2006, 03:03:11 PM »
They are aware of it ever since the Web Shield release. It's not really a new thing :P
Visit my webpage Angry Sheep Blog

hlecter

  • Guest
Re: URL blocking and wildcards
« Reply #9 on: April 13, 2006, 03:23:32 PM »
Why should we hide such a powerful weapon against blocking unwanted stuff.  ;D

Use of wildcards as illustrated by RejZoR makes this a very powerful feature of Avast.

Does it really matter what it was really meant for?  ;)

I haven't calculated on it, but a large part of a Hostfile can be replaced by a small number of entries in Avast'  blocklist,  I assume.

It has been discussed on the fora, but my impression is that it is not widely used.
A "semisecret" feature of Avast.  ;)


Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9408
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: URL blocking and wildcards
« Reply #10 on: April 13, 2006, 03:38:41 PM »
Host file is useful only for limited range of stuff. Wildcards are much more flexible.
Visit my webpage Angry Sheep Blog

hlecter

  • Guest
Re: URL blocking and wildcards
« Reply #11 on: April 13, 2006, 03:43:28 PM »
Just what I tried to say. That was my whole point.

EDIT: The downside of not having English as your first language.   ;D
« Last Edit: April 13, 2006, 03:47:22 PM by hlecter »

Offline igor

  • Avast team
  • Serious Graphoman
  • *
  • Posts: 11856
    • AVAST Software
Re: URL blocking and wildcards
« Reply #12 on: April 13, 2006, 03:43:48 PM »
Regarding the blocking - I don't think it's any secret (at least not from our side ;)), it's just that it may not be exactly the best means, as Rejzor said.
I am not very familiar with today's ad-blockers, but I'd say simply blocking the ads might cause unwanted corruption to the HTML page layout (because the browser gets "confused"). It would probably be better to replace the banners with some small/invisible (empty) images, and things like that - which Web Shield doesn't do.

hlecter

  • Guest
Re: URL blocking and wildcards
« Reply #13 on: April 13, 2006, 04:43:21 PM »
Igor,

Just an example from this page:
I put *cafepress* in blocklist and the advert at the top of the page is replaced with a square without content after reloading.

No layout corruption in this case anyway. I can mouse-over and see the address, but clicking at the square gives me Access Denied from Avast.

HL

I will remove it from my blocklist  ;)

Offline RejZoR

  • Polymorphic Sheep
  • Serious Graphoman
  • *****
  • Posts: 9408
  • We are supersheep, resistance is futile!
    • RejZoR's Flock of Sheep
Re: URL blocking and wildcards
« Reply #14 on: April 13, 2006, 05:28:59 PM »
Well that empty square instead of AD is actually the thing that me and igor mentioned.
It was simply not designed for this. If you intend to block banners and you happen to use Firefox, then use AdBlock extension for it. It has a nice option to collapse HTML structure and also properly removes those banners.
This way you get nice pages where you mostly won't even know it had any ads.
Unless the page is designed badly (like CNET sites) which often have stuopid ads somewhere in the middle of text, blocking them will result in gray square instead of ad.
Still better than some flashing psychotic ad though ;D
Visit my webpage Angry Sheep Blog