Page 2 of 5

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sat May 21, 2011 10:58 am
by pilch
Just installed this exciting MOD. Within ACP -> Post Settings screen, two things I noticed.. The values inserted using the SQL didn't translate through to the ACP screen so I used your screenshots & the wiki to configure to match. The error I had was about duplicate entries on the 'Link Search Strings'.. Came up with a General Error to say those dynamic values were already present. Browsed through the 'phpbb_config' table and saw that the values were there. Again though, the values held in the db table aren't appearing within the ACP.

*UPDATE* - Just went back and tried again just before pressing SUBMIT and no errors this time.. just an oddity then perhaps at first install/config.

Looking forward to playing with this and bringing it through to LIVE site. We have over 300k members and too much spam.

Questions

1. RE: Zombie registration purge install. As I will be installing this into a forum already with a lot of aged spambot accounts with their lovely posts ;) will this pick these posters up and remove them? I'm not sure if I read enough or if this information was a bit lacking so more of an explanation on that (or a link) would be more than welcome. What I don't want to happen is to remove 0 posters who are just lurkers, we have plenty of them.

2. http://dangerousprototypes.com/docs/Fil ... r-post.png I'm not getting both of these 'notification' messages when I try a test post i.e.

Code: Select all

example post viagra http://www.spam.com
[/b] - I just see "Your post looks too spamy for a new user, please remove off-site URLs. Click for help."

3. How do I open up the 'Click for help' in a new window? Better still, a cool pop-up.

4. The minimum post chars doesn't seem to work. I've got mine set at 50 and it let a post through as:

Code: Select all

example post
Please note: All of this testing done a brand-new account, created today.

Thanks again both of you !

Rich.

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sat May 21, 2011 6:04 pm
by Metalogic
Thanks for the MOD, it looks like what I need.

I carefully followed all the installation instructions but ironically, I'm getting an error on the one file I didn't modify:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/36/d93908339/htdocs/metalogicsw.com/forum/includes/functions_link_filter.php on line 24

That file is unmodified from the zip. Has anyone else seen this error? I did a search but didn't get any relevant hits.

TIA,
Metalogic

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sun May 22, 2011 7:16 am
by Metalogic
Figured it out. My site was still running PHP 4. I simply upgraded to PHP 5 and that fixed the issue.

For anyone else that may run into this problem, unlike phpBB 3.0, this MOD is not compatible with PHP 4.

Hope this helps someone else.

All the best,
Metalogic

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sun May 22, 2011 12:08 pm
by pilch
Glad to heat you sorted the issue Metalogic. Rewarding when yo fathom something out yourself lile that. Hopefully the MOD authors might pop in and reply back to my questions shortly as I'm dying to put this in LIVE.

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sun May 22, 2011 4:22 pm
by Philthy
Hi Pilch.
The database install "oddity" is known, we haven't figured that out yet? It appears that no entries are made in the ACP, but closing the browser and opening the ACP again brings them up?

1: Don't run the zombie purge, unless you want to delete all zero posters older than the configured date. If you have lots of lurkers, I'd leave well alone.

2: That is an old image. The new error only gives one warning. If there are multiple infractions, it will work it's way through them as the bad words/links are removed one by one. I think Dangerousprototypes coded it this way, to make a spammer work like hell trying to workaround the restrictions, before posting a useless spam, or just plain giving up?

If you do install this mod, turn on the reporting for a while, and sit back and enjoy watching the spammers squirm around trying to bypass it. Most spambots give up. Human spammers twist and turn trying to work out what is stopping them getting the links they desire, and then either give up, or make a worthless post. They don't seem to bother returning either? The useless posts are very easy to spot, and quickly deleted. Stopping a human spammer posting anything is never going to be easy, but denying them links appears to drive them away?

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sun May 22, 2011 5:10 pm
by pilch
Thanks for the response Philthy, much appreciated. You've put my mind at rest, answered all my concerns so I'll look forward to putting this one in live v.shortly! D'ya see your PM from me yet?

Re: [RC-1] spam hammer: ends spam. period.

Posted: Wed May 25, 2011 4:45 pm
by dangerousprototypes
Yes, this only works with 3.0.8.

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sat May 28, 2011 6:52 am
by Metalogic
I've been running this MOD for a few days and wanted to provide some feedback:

First and foremost, this MOD rocks! It works really well and no bots have gotten through at all. Went from 5 spam messages a day to 0. It is now feasible again to administer my forum long term. So thank you very much to everyone involved.

I do have a couple of suggestions around logging. I know that it is recommended to leave logging turned off because it generates a lot of data. But as an administrator, I think it's essential to have logs for a tool that is automatically rejecting posts and pruning users. So my suggestion is to recommend logging be turned on but limit its impact as follows:
* Don't log user pruning when no users were found to prune. This will eliminate the following messages:
» spam hammer zombie cleanup: <no users listed>
* Prune Spam Hammer messages after a certain amount of time. This can be user entered or hard coded to a reasonable value like 30 days
* When a post is rejected, don't write the entire content of the rejected post. Rather, write out the specific text that was rejected (a URL for example) with some context (the prior 50 characters and following 50 characters). This will prevent huge posts from clogging the logs.

I believe the above changes would address the impact of logging and allow administrators to use this important tool without fearing that they will fill their logs.

All the best,
Metalogic

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sun May 29, 2011 9:14 am
by pilch
Metalogic wrote:I've been running this MOD for a few days and wanted to provide some feedback:

First and foremost, this MOD rocks! It works really well and no bots have gotten through at all. Went from 5 spam messages a day to 0. It is now feasible again to administer my forum long term. So thank you very much to everyone involved.

I do have a couple of suggestions around logging. I know that it is recommended to leave logging turned off because it generates a lot of data. But as an administrator, I think it's essential to have logs for a tool that is automatically rejecting posts and pruning users. So my suggestion is to recommend logging be turned on but limit its impact as follows:
* Don't log user pruning when no users were found to prune. This will eliminate the following messages:
» spam hammer zombie cleanup: <no users listed>
* Prune Spam Hammer messages after a certain amount of time. This can be user entered or hard coded to a reasonable value like 30 days
* When a post is rejected, don't write the entire content of the rejected post. Rather, write out the specific text that was rejected (a URL for example) with some context (the prior 50 characters and following 50 characters). This will prevent huge posts from clogging the logs.

I believe the above changes would address the impact of logging and allow administrators to use this important tool without fearing that they will fill their logs.

All the best,
Metalogic
Metalogic, that's great feedback for the MOD authors and I agree with your suggestions. I've not had the time that I'd have hoped to spend evaluating the logging just yet and to a certain extent, the MOD overall..

Re: [RC-1] spam hammer: ends spam. period.

Posted: Sun May 29, 2011 9:32 am
by pilch
Can confirm, it's working a treat, stopping spam as anticipated. Removing the 'Sleeper Agent' option for the time being though as we do have a lot of authentic users who just take a while to shake themselves off, dust themselves down and get into the whole 'posting' thing. So it's probably that they've lurked for a while, or jsut forgotten then had an account. From the log, it would appear that we're policing these members a little too heavily with this sleeper option enabled. I can see EXACTLY what they're trying to do and it checks out with me so.. let's see how it goes..

*rubs his hands* Soooo nice to see those spammers' attemtps being blocked etc. Wicked!

Re: [RC-1] spam hammer: ends spam. period.

Posted: Mon May 30, 2011 10:27 am
by dangerousprototypes
Thanks for the great feedback.

User prunes and extreme mode actions area always logged, the extra logging shows what messages give users issues (as I recall, been a while).

I would also like an excerpt-only log message, but as I recall that was a huge pain because of the way we search for strings. I tried to keep the load on the system minimal, but this feature needed quite a bit of extra work (as I recall...). I pay by the cycle, so every little bit helps.

I also feel like the prune is a little aggressive, and I know I have users running up against it now. I think I had it working so that only new users (t he phpBB3 setting) were filtered, and that lets you 'rescue' someone. I don't remember, but I may need to look at that again to see if it should go in an update.

Re: [RC-1] spam hammer: ends spam. period.

Posted: Tue Jun 07, 2011 3:21 am
by John T. Folden
Hey all,
Spam hammer has been continually successful here. I haven't had to tweak it for quite a while and it's kept all but the most sneaky, persistant human spammers at bay (you know the ones...who post like normal users for a couple weeks then go feral and finally stick spam in the profile/sig ;).

I like having the logging turned on but I'm wondering if there is some way to NOT log posts (attempted or otherwise) by anonymous? At this point I just want to see the logging of those with an account (to help isolate spammers from legitimate lurkers).

Re: [RC-1] spam hammer: ends spam. period.

Posted: Tue Jun 07, 2011 5:55 am
by dangerousprototypes
Not that I know of, sorry.

In other news we got a review for the modDB. Looks like theres quite a few things they want fixed, not sure when i will be able to get to them:
Paul wrote:Hello,

As you may know all modifications submitted to the phpBB modification database must be validated and approved by members of the phpBB Team.

Upon validating your modification the phpBB MOD Team regrets to inform you that we have had to deny your modification.

To correct the problem(s) with your modification, please following the below instructions:
  1. Make the necessary changes to correct any problems (listed below) that resulted in your modification being denied.
  2. Test your MOD, the XML file and the installation of it.
  3. Re-upload your MOD to our modifications database.
Please ensure you tested your modification on the latest version of phpBB (see the Downloads page) before you re-submit your modification.

Here is a report on why your modification was denied:
DoYouSpeakWak wrote:Works as intended. Installs fine with automod, xml looks okay besides what mentioned allready. But it gives out this error when posting bad words or post ext links without permission.

At url:"posting.php?mode=reply&f=2&t=1"

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_link_filter.php on line 354: Undefined index: links_first_post_words


Suggestions:


Add permissions for the features of this mod. So that each function can be applied to each group.
Make a umil installer, that will take away all the problem with the unintall as well. Since its only config settings your sql does now it will be very easy to make a umil installer, even if you add permissions, its the way to go really.
Make sure when you say "Add a link" that you specify what link type it is, Full url, only "iewtopic.php?f=2&t=1" or whatever it now is. Worked with full but its worth adding in the language edits.
Derky wrote:First of all, good job on fighting the spammers! ;)
SQL ERRORS ON UNINSTALL
*Several empty SQL errors on uninstall.
I googled but didnt see how to fix it.
You can provide an additional uninstall MODX file.
Just create a MODX file with the uninstall instructions and then link that from the main install_mod.xml by using:

Code: Select all

<link-group>
	<link type="uninstall" href="contrib/contrib/uninstall.xml" lang="en">Uninstall</link>
</link-group>
For more info about MODX, see the Specification.

install.xml
- The <title> of the MOD is not the same as the name in the MOD Database. Please keep this consistent.
- <sql> Please use UMIL for all database-related changes: http://www.phpbb.com/mods/umil/

Changes to cron.php, posting.php, /includes/ucp/ucp_pm_compose.php, /includes/ucp/ucp_profile.php
- include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
Please use !function_exists instead of include_once. E.g.

Code: Select all

if (!function_exists('function_name')) {
	include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
}
Changes to /language/en/acp/board.php
- Please make sure you use tabs between the => symbols.

root/includes/functions_link_filter.php
- Please notice the Coding Guidelines, especially spacing between =-signs, if and (, always use brackets.
http://area51.phpbb.com/docs/30x/coding ... codelayout
- Harcoded language such as

Code: Select all

	//If there isn't a phpbb3 no_link message add one
	if (empty($user->lang['NO_LINK_FOR_YOU'])){
		$user->lang['NO_LINK_FOR_YOU']='Antispam: You can\'t have off-site URLs in your sig until you post a few times. ';
	}
is not allowed in these files.
- The language strings are also missing.
- Please notice that hardcoded language in the add_log() function is also not allowed.
Please refer to the following links before you reupload your modification: For further reading, you may want to review the following: For help with writing phpBB MODs, the following resources exist:
  • Forum for MOD Authors\Help
  • IRC Support - [url=irc://irc.freenode.net/phpBB-coding]#phpBB-coding[/url] is registered on the FreeNode IRC network ([url=irc://irc.freenode.net/]irc.freenode.net[/url])
If you wish to discuss anything in this PM please send a message using the discusion tab in the MOD database, My Modifications, manage for this MOD.

If you feel this denial was not warranted please contact the MOD Validation Leader.
If you have any queries and further discussion please use the Queue Discussion Topic.

Thank you,
phpBB MOD Team
I probably won't spend time changing coding style or chasing down hard-coded strings, this is probably destined to be RC forever ;) They error I will try to address the errors and make a new release though.

Re: [RC-1] spam hammer: ends spam. period.

Posted: Tue Jun 07, 2011 12:50 pm
by Philthy
I'd love to get stuck into this, and start sorting it, but I'm way out of my league.
It's been way too useful a mod for me, absolutely killing the spammers, to fall at the last hurdle?

Re: [RC-1] spam hammer: ends spam. period.

Posted: Tue Jun 07, 2011 1:20 pm
by dangerousprototypes
I've asked a colleague to look into the minor stuff. The UMIL stuff - ugh, I didn't even want to learn the automod stuff...