Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Kakao on October 06, 2006, 12:32:38 AM

Title: Spam Black List
Post by: Kakao on October 06, 2006, 12:32:38 AM
Link to Mod (http://mods.simplemachines.org/index.php?mod=467)
Rate this Mod (http://mods.simplemachines.org/index.php?action=review;sa=add;mod=467)

Mod written by Clodoaldo Pinto Neto AKA Kakao

* * * * * * * * * * * * * * * * * * * * * * *
UNINSTALL PREVIOUS VERSION BEFORE UPGRADING !!!
* * * * * * * * * * * * * * * * * * * * * * *

This mod prevents the posting of topics or personal messages containing black listed urls. It uses the Wikipedia black list and a user created custom black list.

After installing check with your host provider if it uses a HTTP Proxy for external connections and if so enter it in Admin -> Features and Options -> Basic Features.

If the Mod does not catch spam URLs look for the wikipedia_black_list.txt file in /attachments. If it is empty (0 bytes) then you have connection problems. Recheck the HTTP Proxy address and wait for one hour to try again.

CUSTOM BLACK LIST
A custom black list can be created.
Create a file named custom_black_list.txt in the attachments directory.
Each line on that file is a regular expression to be blocked. Do not forget to escape the dots otherwise many posts will be blocked and your forum can become unusable. If you don't understand why and don't want to learn basic regular expression usage then do not create a custom black list.
Sample file:

intblog\.org # this will block the whole domain
subdomain\.domain\.tld # this will block only the subdomain

My custom black list can be found here:
http://codepoint.net/attachments/custom_black_list.txt

History:

version 0.2.0 2007-03-22
- it is possible to create a custom black list

version 0.1.1 2006-09-04
- fixed the regular expression too large error

version 0.1.0 2006-09-01
- added option in Admin -> Features and Options -> Basic Features to enter the http proxy address

version 0.0.3 2006-08-30
- reverted to online download this time using curl

version 0.0.2 2006-08-29
- removed the black list online download.
- added the prerequisite of a cron job setup.

version 0.0.1 2006-08-28
Title: Re: Spam Black List
Post by: Greek on December 17, 2006, 04:50:44 AM
It sounds good and I have installed it without problem, but how it works?
I mean how can I add my own black listed URL's?
I don't see such option.
Title: Re: Spam Black List
Post by: Kakao on December 17, 2006, 05:13:16 AM
It works by checking if the posted message contains any of the black listed terms in attachments/wikipedia_black_list.txt

As of this version there is no option to create your own black list.
Title: Re: Spam Black List
Post by: Greek on December 17, 2006, 03:54:26 PM
There is no such text file in attachments.
Title: Re: Spam Black List
Post by: Kakao on December 17, 2006, 03:58:35 PM
Have a topic been posted after the mod was installed?

Does the Apache user have writing right in that directory?
Title: Re: Spam Black List
Post by: Greek on December 17, 2006, 04:22:23 PM
Νο Ι didn't make any post after installation.
Something else.. Can I add my own links in wikipedia_black_list.txt manually?
Title: Re: Spam Black List
Post by: Kakao on December 17, 2006, 04:26:27 PM
The text file will be downloaded during the first post.

If you add your own entries they will be deleted in the next black list update.
Title: Re: Spam Black List
Post by: Greek on December 17, 2006, 04:35:12 PM
Ok. Thanks for the info :)
Title: Re: Spam Black List
Post by: [tiktaktok] on December 18, 2006, 03:53:07 PM
The mod file has a CRC error. Leading to a white page - deleting the mod from /packages fix this.
Title: Re: Spam Black List
Post by: Kakao on December 18, 2006, 05:35:04 PM
I downloaded the mod and tested it with:

$ gzip -t SpamBlackList_0.1.1.tar.gz

There was no errors.

How did you test it? Where did you download it from? From the mod page?:
http://mods.simplemachines.org/index.php?mod=467

Did you try to download it again?
Title: Re: Spam Black List
Post by: [tiktaktok] on December 20, 2006, 11:56:51 PM
Quote from: Kakao on December 18, 2006, 05:35:04 PM
I downloaded the mod and tested it with:

$ gzip -t SpamBlackList_0.1.1.tar.gz

There was no errors.

How did you test it? Where did you download it from? From the mod page?:
http://mods.simplemachines.org/index.php?mod=467

Did you try to download it again?
Yes i just tried it again, winrar tells me CRC error and file is corrupt.
Maybe this isnt windoze compatible?
Title: Re: Spam Black List
Post by: Kakao on December 21, 2006, 09:22:55 AM
I just downloaded it in Windows and tested with Winrar and there was no errors.
Title: Re: Spam Black List
Post by: mrselnombre on January 02, 2007, 08:38:23 AM
it works fine for me, thanks a lot. We don't often get hit by spam, but it will be nice to keep it out altogether.
Title: Re: Spam Black List
Post by: Hadrian on January 22, 2007, 05:38:59 AM
I getting this message every time i try to install this mod.

"The package you are trying to download or install is either corrupt or not compatible with this version of SMF."  i am only new at this so please forgive if its something silly on my part.   

Version Information:
Forum version: SMF 1.0.10
Current SMF version: SMF 1.1.1

http://activity4life.com/forum
Title: Re: Spam Black List
Post by: Kakao on January 22, 2007, 06:25:11 AM
This mod will only work with the 1.1.1 version while yours is 1.0.10
Title: Re: Spam Black List
Post by: Hadrian on January 22, 2007, 06:33:51 AM
well i thought it would turn out to be something silly on my part LOL  :)

Title: Re: Spam Black List
Post by: Hadrian on January 22, 2007, 06:40:54 AM
is there a perfered rute to upgradeing and will it upset the css files?
Title: Re: Spam Black List
Post by: Kakao on January 22, 2007, 06:45:48 AM
I'm far from the best person to answer that. I'm not a SMF hacker. You will have much better guidance asking it in the proper forum.
Title: Re: Spam Black List
Post by: Hadrian on January 22, 2007, 06:46:59 AM
thank you for for all your help  :) i will thry them now
Title: Re: Spam Black List
Post by: xsharewarex on February 18, 2007, 09:31:09 AM
I have installed the mod successfully. I would like to know how do I add my own customized URL's that I want to blacklist?


Regards
XsharewareX
Title: Re: Spam Black List
Post by: Kakao on February 18, 2007, 09:37:59 AM
Unfortunetely, there is no way to add URL's in this version. It is a priority in a future version.
Title: Re: Spam Black List
Post by: tarsia on February 21, 2007, 06:47:09 PM
Hello,

I think it might help some users to see not the error-message only, but also the black listet URL(s) / words.

So I added a link to wikipedia in the error-message in the "Errors.english.php":
$txt['error_black_listed_url'] = 'The message contains black listed URL(s)!  Have a look <a href="http://meta.wikimedia.org/w/index.php?title=Spam_blacklist" target="_blank">here</a>';

Maybe it's a nice idea for others, too.

tarsia
Title: Re: Spam Black List
Post by: jblogg on March 11, 2007, 06:33:14 AM
this mod has totally mucked up my forum and i get this message:

QuoteFatal error: Cannot redeclare contain_black_listed_url() (previously declared in /home/sgksnzhq/public_html/forum/Sources/Subs.php:3629) in /home/sgksnzhq/public_html/forum/Sources/Subs.php on line 3787

can someone please explain how i can get my forum working agen!
Title: Re: Spam Black List
Post by: Kakao on March 11, 2007, 06:49:21 AM
It looks like you somehow managed to apply the mod twice.

Extract the mod package, look for the mod source and delete it manually from your forum.
Title: Re: Spam Black List
Post by: jblogg on March 11, 2007, 07:09:01 AM
i have opened subs.php and gone to line 3787 and found the blacklist code. it does look as if it has been doubled up but what should be the first line of the code that i need to delete be
Title: Re: Spam Black List
Post by: jblogg on March 11, 2007, 07:12:59 AM
sorted thanks
Title: Re: Spam Black List
Post by: jblogg on March 12, 2007, 04:03:13 PM
more problems i need the code in which i have to delete in the following files:

./Sources/Post.php
./Sources/PersonalMessage.php
./Themes/default/languages/Errors.english.php
./Sources/ModSettings.php
./Themes/default/languages/Help.english.php
./Themes/default/languages/ModSettings.english.php
Title: Re: Spam Black List
Post by: Kakao on March 12, 2007, 04:23:37 PM
All the modified code is in the mod package. Just extract it and look for the code.
Title: Re: Spam Black List
Post by: jblogg on March 12, 2007, 04:30:44 PM
i'll try
Title: Re: Spam Black List
Post by: mini_one on April 11, 2007, 04:49:52 PM
I am using the SMF 1.1 RC3-1 for past 5 month with no problems. Today all of a sudden i am getting this message:

The message contains black listed URL(s)

every time I try to 'quote' a post or PM. Any ideas?
Title: Re: Spam Black List
Post by: Kakao on April 11, 2007, 05:35:08 PM
Does it happen with any text you try to quote or PM or just with a especific text?

Could you post the text that is triggering the message?
Title: Re: Spam Black List
Post by: mini_one on April 12, 2007, 12:21:39 PM
It seems to be triggered by the
Quote
brackets in any PM or message reply. I found the following entry:  [[Category:]] in the /attachments/wikipedia_black_list.txt  data file. If I remove it the problem is fixed but it lasts only couple of hours before it is back.  So in the mean time I go back like once every hour and remove it...don't know how long I ca keep at this... :-\
Title: Re: Spam Black List
Post by: Kakao on April 12, 2007, 01:30:57 PM
Ok. I'm working on it.
Title: Re: Spam Black List
Post by: mini_one on April 12, 2007, 02:09:24 PM
Quote from: Kakao on April 12, 2007, 01:30:57 PM
Ok. I'm working on it.
Thank you....Paul.
Title: Re: Spam Black List
Post by: Kakao on April 12, 2007, 03:08:22 PM
The 0.2.1 version attempts to fix it.

Uninstall the previous version before upgrading and delete the attachments/wiki* files for the changes to take effect immediately.

This was a quick emergency patch not very well tested. It may contain new bugs.

Please report any problems.
Title: Re: Spam Black List
Post by: mini_one on April 12, 2007, 04:01:20 PM
I currently use the SMF 1.1 RC-3 is this the version I need to completely un-install? I also use a custom Theme which I have extensively modified.    :'(

Is there PHP script or code I can change/modify to fix my problem?

Thank you, Paul.
Title: Re: Spam Black List
Post by: Kakao on April 12, 2007, 04:20:06 PM
The new Spam Black list version will only install on SMF 1.1.2.

You can download the source (the package .gz) and peek at the code. I don't know how different will it be from the version you are using. Make a mistake and it will break your forum. And if you change your source files you will not be able to uninstall SBL later as it will look for the old code to uninstall.  :(
Title: Re: Spam Black List
Post by: mini_one on April 12, 2007, 04:33:43 PM
Thank you for the advice...I've been there and believe me I am not going there again. I have the luxury to use an alternate play ground site to test it first.  If I find a cure I will post it for others.

Nothing worth a while is easy...you've been very helpfull.
Paul.
Title: Re: Spam Black List
Post by: Kakao on April 12, 2007, 04:47:05 PM
I have posted about this problem at the wikimedia spam list discussion page. I doubt they will care about it but If anyone wants to second it...

http://meta.wikimedia.org/wiki/Talk:Spam_blacklist#Category_in_black_list_source
Title: Re: Spam Black List
Post by: Flutterby on April 13, 2007, 04:42:53 AM
Sorry, truth be told I had no idea what was causing it, thank you.
Title: Re: Spam Black List
Post by: Sarge on April 13, 2007, 04:45:20 AM
Quote from: Flutterby on April 13, 2007, 04:42:53 AM
Sorry, truth be told I had no idea what was causing it, thank you.

You should have posted this in the other thread. But it's OK and you're welcome! :)
Title: Re: Spam Black List
Post by: Si6776 on April 15, 2007, 05:47:26 PM
Hi, I am trying to install this on SMF 1.1.2, and am getting the "The package you are trying to download or install is either corrupt or not compatible with this version of SMF." error message.  I uninstalled the old version and deleted the files first.  What am I doing wrong?
Title: Re: Spam Black List
Post by: Si6776 on April 15, 2007, 05:58:02 PM
Update to above, the version on the packages list was 0.2.0, but have now installed 0.2.1.

Unfortunately, the 'blacklisted URLs' problem is still evident when using Quotes. :(
Title: Re: Spam Black List
Post by: Kakao on April 15, 2007, 06:25:52 PM
Delete the attachments/wikipedia* files after installing the new package.
Title: Re: Spam Black List
Post by: Si6776 on April 15, 2007, 06:43:11 PM
After installing the new package? Please excuse my ignorance, but I would have thought, if anything, before installing the new package, otherwise, how does the mod work? (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.avfu59.dsl.pipex.com%2Fsmileys%2Fdunno.gif&hash=a84096eb7ae78f52af672b02df54b41ed35ea152)
Title: Re: Spam Black List
Post by: Kakao on April 15, 2007, 07:02:09 PM
If the new package does not find the files it will download a new one.

After that do you still see the last line in the wikipedia black list containing [[Category:]] ?
Title: Re: Spam Black List
Post by: Si6776 on April 15, 2007, 07:13:27 PM
No. I deleted the wiki files, then reinstalled the new package, and all seems to be working now. Thanks! :)
Title: Re: Spam Black List
Post by: jelv on December 07, 2007, 06:56:57 PM
Does this modification also prevent someone putting one of the blacklisted URLs as the website in their profile?
Title: Re: Spam Black List
Post by: Kakao on December 07, 2007, 07:05:04 PM
No, it does not prevent the use of blacklisted urls as the profile's web site. This mod is mainly targeted at those who want to let guests post. To prevent the use of spam urls in the profile's web site use the captcha at register time.
Title: Re: Spam Black List
Post by: jelv on December 08, 2007, 08:45:35 AM
We're currently running a phpBB2 forum and it is looking very, very likely we will switch to SMF. I have done a dummy run on the conversion and it was magic!

We have the captcha enabled for registration on phpBB2, and we don't allow guest posting. What we are getting is people registering with highly dodgy websites in their profile, receiving the registration email and enabling their accounts, then posting a spam (Why they go to all this bother knowing we will get rid of it as fast as they put it on there is beyond me).

Obviously this mod will stop the posting but if they found it wouldn't accept their dodgy website in their profile when they tried to register perhaps they would realise and go away before completing the process.
Title: Re: Spam Black List
Post by: TheEdgeGER on July 30, 2008, 04:56:52 PM
I'm working with SMF 1.1.5 and I'm getting this message too
"The package you are trying to download or install is either corrupt or not compatible with this version of SMF."

Is that because of the 1.1.5 version?
Title: Re: Spam Black List
Post by: Kakao on July 30, 2008, 07:43:19 PM
Yes. It is still in the 1.1.4 version.
Title: Re: Spam Black List
Post by: Ambasador on February 27, 2009, 10:24:04 AM
Will someone update this for 2.0? It's a great protection system!
Title: Re: Spam Black List
Post by: ceewee on March 28, 2009, 10:38:22 AM
Quote from: Ambasador on February 27, 2009, 10:24:04 AM
Will someone update this for 2.0? It's a great protection system!

And if possible for 1.18 I have 6 smf 1.18 sites...
Title: Re: Spam Black List
Post by: Hondo on June 07, 2009, 06:28:00 AM
Hi,
will it be updated to 1.1.9 sometimes?
Title: Re: Spam Black List
Post by: steve51184 on May 03, 2010, 12:17:14 PM
any chance of a 2.0 version please? looks simple to do if you know how :)
Title: Re: Spam Black List
Post by: Apllicmz on November 06, 2010, 01:49:27 PM
Portuguese

<file name="$languagedir/Errors.portuguese_pt.php" error="skip">
<operation>
<search position="before"><![CDATA[
$txt['error_poll_few'] = 'Voc&ecirc; deve ter pelo menos duas op&ccedil;&otilde;es!';
]]></search>
<add><![CDATA[
$txt['error_black_listed_url'] = 'A mensagem cont&eacute;m URL listada preto(s)';
]]></add>
</operation>
</file>

<file name="$languagedir/Errors.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="before"><![CDATA[
$txt['error_poll_few'] = 'Voc&ecirc; deve ter pelo menos duas op&ccedil;&otilde;es!';
]]></search>
<add><![CDATA[
$txt['error_black_listed_url'] = 'A mensagem cont&eacute;m URL listada preto(s)';
]]></add>
</operation>
</file>



<file name="$languagedir/Help.portuguese_pt.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[

$helptxt['sbl_http_proxy'] = 'Pergunte ao seu provedor de hospedagem se ele usa um servidor proxy para conexões HTTP externa e digite o endere&ccedil;o do proxy em um desses formatos:<br />
IP: 123.456.789.012<br />
URL: proxy.hostname.tld<br /><br />
ou deixe em branco para nenhum proxy';
]]></add>
</operation>
</file>

<file name="$languagedir/Help.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[

$helptxt['sbl_http_proxy'] = 'Pergunte ao seu provedor de hospedagem se ele usa um servidor proxy para conexões HTTP externa e digite o endere&ccedil;o do proxy em um desses formatos:<br />
IP: 123.456.789.012<br />
URL: proxy.hostname.tld<br /><br />
ou deixe em branco para nenhum proxy';
]]></add>
</operation>
</file>



<file name="$languagedir/ModSettings.portuguese_pt.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
$txt['sbl_http_proxy'] = 'Endere&ccedil;o Proxy HTTP (IP ou URL)';
$txt['sbl_http_proxy_port'] = 'Porta do Proxy HTTP (Default 3128)';
]]></add>
</operation>
</file>

<file name="$languagedir/ModSettings.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
$txt['sbl_http_proxy'] = 'Endere&ccedil;o Proxy HTTP (IP ou URL)';
$txt['sbl_http_proxy_port'] = 'Porta do Proxy HTTP (Default 3128)';
]]></add>
</operation>
</file>