Mar 05

Não sei o que acham do sistema de notificações dos portais da rede IOL mas eu simplesmente não SUPORTO. É extremamente intrusivo, não permite ser desactivado e pior que tudo está sistematicamente a repetir-se (basta fazer um refresh da página e já lá está novamente! *g*).

Felizmente há várias formas de acabar com esta praga, e uma delas é usar o fabuloso plugin AdBlock Plus. Nada mais simples que abrir as opções do plugin no vosso browser favorito (Espero que seja o Firefox ou Chrome :p) e acrescentar as seguintes regras nos filtros:

iol.pt###iolpush_wrapBoxPush
iol.pt##.iolpush_open

20130305224231121

Et voila! A caixa de noticias irritante desapareceu! :D

Tagged with:
Nov 20

So you own a blog (or some other kind of website) and you have been blocked by facebook from posting from that domain? Here goes a simple trick to minimize the impact of such problems:

First of you should contact Facebook and ask them to remove your domain from the spam list. You can do this by email, but I advise you to do it by letter because this way you probably show your motivation and real effort in correcting this issue (at least this is my opinion as I think this make things more personal).

But in the meantime here is what I think you should do:

1º buy a second domain. Since you cannot use the original domain while being blocked you are going to need to use this second domain do fool Facebook (at least until they unblock your original domain).
2º point the new domain to the very same page as the domain blocked by Facebook. Create a new VirtualHost entry and find a way of replacing all ocurrences of the original domain by the new domain name. If you are using Apache and have the mod_substitute enabled you can easily do it by adding the following block of code:


AddOutputFilterByType SUBSTITUTE text/html
Substitute "s|originaldomain\.tld|newdomain.tld|i"

3º create a set of rewrite rules as follows:

RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit
RewriteCond %{HTTP_HOST} !originaldomain.tld
RewriteRule ^(.*)$ http://originaldomain.tld/$1 [L,R=301]

Add them to your .htaccess file.

You’r all set! All you need to do now is share the links using the new domain name. For example, instead of sharing links this way:

http://originaldomain.tld/breaking-news-cancer-cure-was-found

You should share them like:

http://newdomain.tld/breaking-news-cancer-cure-was-found

And that’s it! You can now keep sharing links on facebook. Here goes a little explanation about what is being done here:

Whenever facebook marks a domain as spam the validation of further links is done using two methods:

1st – The domain is checked against a blacklist. If it is found in a blacklist then the page you are trying to share is blocked.
2nd – If the domain is not in a blacklist than all the links inside the page that you are trying to share are checked against the same blacklist. If they are found then the page is blocked.

All that the first part of this little trick does is to replace all the ocurrences of the original domain by the new domain name whenever someone opens your eebsite using the new domain, and this way, when facebook connects to your website to retrieve the description and thumbnail, it will find a simple blog that has nothing to do with the one marked as spam.
The second part of this trick is used to redirect all of your users to the original domain. Well, not all… all but facebook! (that is what the line “RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit” do) :)

So in the end, every people (except for facebook) that tries to enter your website using the new domain will be automatically redirected to the original domain.

Tagged with:
Mar 15

If you run a blog you are probably one  of the people that is affected by SPAM originating in servers from a company called ubiquityservers. If you google it you will find hundreds of complaints and unfortunately it seems that people at ubiquityservers will always look the other way regarding this issue.

I have searched for all the subnets registered by ubiquityservers and here it is the results. Just open your .htaccess and add this information to it:

 

order deny,allow
deny from 70.32.32.0-70.32.32.255
deny from 69.147.236.0-69.147.236.255
deny from 64.120.2.0-64.120.2.255
deny from 173.208.32.0-173.208.39.255
deny from 64.120.16.0-64.120.19.255
deny from 173.234.12.0-173.234.15.255
deny from 23.19.32.0-23.19.35.255
deny from 173.234.88.0-173.234.89.255
deny from 108.62.56.0-108.62.63.255
deny from 173.234.80.0-173.234.83.255
deny from 23.19.168.0-23.19.171.255
deny from 70.32.34.0-70.32.34.255
deny from 174.34.151.0-174.34.151.255
deny from 174.34.144.0-174.34.145.255
deny from 173.234.180.0-173.234.183.255
deny from 64.120.4.0-64.120.7.255
deny from 173.234.188.0-173.234.188.255
deny from 108.62.192.0-108.62.195.255
deny from 108.62.152.0-108.62.159.255
deny from 23.19.80.0-23.19.83.255
deny from 23.19.84.0-23.19.87.255
deny from 108.62.200.0-108.62.203.255
deny from 108.62.252.0-108.62.255.255
deny from 23.19.124.0-23.19.127.255
deny from 23.19.128.0-23.19.131.255
deny from 23.19.248.0-23.19.251.255
deny from 23.19.184.0-23.19.187.255
deny from 23.19.216.0-23.19.219.255

# Servers @ Nobis (related to UbiquityServers)

deny from 70.32.32.0-70.32.47.255
deny from 67.201.48.0-67.201.49.255
deny from 72.37.145.0-72.37.145.255
deny from 173.208.0.0-173.208.127.255
deny from 69.174.60.0-69.174.63.255
deny from 174.34.128.0-174.34.191.255
deny from 173.234.0.0-173.234.255.255
deny from 108.62.0.0-108.62.255.255
deny from 72.37.224.0-72.37.231.255
deny from 23.19.0.0-23.19.255.255
deny from 72.37.237.0-72.37.237.255
deny from 72.37.218.0-72.37.219.255
deny from 72.37.222.0-72.37.223.255
deny from 72.37.221.0-72.37.221.255
deny from 67.201.0.0-67.201.7.255
deny from 72.37.242.0-72.37.243.255
deny from 67.201.40.0-67.201.40.255
deny from 72.37.246.0-72.37.247.255
deny from 216.6.224.0-216.6.239.255
deny from 72.37.204.0-72.37.204.255
deny from 69.147.224.0-69.147.255.255
deny from 64.120.0.0-64.120.127.255

allow from all

You can check it one by one to confirm, but these are all OK. Say goodby to UbiquitySpam :-)

Tagged with:
Apr 26

This code was tested with ClupBucket 2.0.6. This will allow you to block specific emails domains. It is partivularly useful to block all email providers used to spam (like mailinator.com or temporaryinbox.com).

1st – Open your database and add a record to your config datatable (default is cb_config) with the value “disallowed_email_providers”.
2nd – Open clipbucket Control Panel and add a new phrase with code “usr_email_blacklisted_err” and value “Invalid email”.

3rd – open the main.html from your template.

Search for :

<tr>
<td valign="top">Disallowed usernames</td>
<td valign="top"><label>
<textarea name="disallowed_usernames" id="disallowed_usernames" cols="45" rows="5">{$row.disallowed_usernames}</textarea>
<br />
separate by commas
</label></td>
</tr>

and add below:

<tr>
<td valign="top">Disallowed email providers</td>
<td valign="top"><label>
<textarea name="disallowed_email_providers" id="disallowed_email_providers" cols="45" rows="5">{$row.disallowed_email_providers}</textarea>
<br />
separate by commas
</label></td>
</tr>

4th – Open admin_area/main.php and find (around line 56):

'disallowed_usernames',

and add below :

'disallowed_email_providers',

5th – Open includes/classes/user.class.php and add this function right above the signup_user function (around line 3160) :

/**
* Function to validate email provider
*/
function blacklisted($email){
global $Cbucket;
 
$providers = explode(",", $Cbucket->configs['disallowed_email_providers']);
 
foreach($providers as $provider){
if(eregi(trim($provider) . "$", $email))
return true;
}
return false;
}

6th – Finally enter function signup_user, locate this :

//checking terms and policy agreement
if($array['agree']!='yes' && !has_access('admin_access',true))
e(lang('usr_ament_err'));

add below :

//Check if email provider is blacklisted
if($this->blacklisted($array['email']))
e(lang('usr_email_blacklisted_err'));

You should now be able to block email providers :)

Tagged with:
preload preload preload