2 village_idiot Oct 04, 2005 20:54

No, it's not the ultimate antispam hack, but I'm still working on that. :)
Thanks for the port. The less spam, the better, as far as I'm concerned.
I'm going to see how to implement this hack as a [url=http://b2evolution.net]b2evolution[/url] plug-in. A [url=http://b2evolution.net]b2evolution[/url] plug-in means an easy installation procedure, since the only thing to do is to copy files into the plugins directory.
error wrote:
No, it's not the ultimate antispam hack, but I'm still working on that. :)
Thanks for the port. The less spam, the better, as far as I'm concerned.
lol, there goes the neighborhood :P
kwa wrote:
How quick is it?
[url=http://www.ioerror.us/software/bad-behavior/]Bad Bevahior / Bad Behaviour[/url] takes approximatively 10 ms on my 2 GHz/512 MB server with [url=http://turck-mmcache.sourceforge.net/]Turck MMCache for PHP[/url] installed. It's nothing compared to the whole page generation (100-2,000 ms).[/list:u][/quote] I've noticed [url=http://www.ioerror.us/software/bad-behavior/]Bad Bevahior / Bad Behaviour[/url] slows down with time. It's probably due to its logging feature (I left it to one week, the default value). After two weeks, its execution time increased a lot:
That's more than 4 times slower than on day one. However, whitelisted domains need only 4 ms. It logged 641 blocked requests (1.15%) out of a total of 55,989 requests. However, I noticed blocking open proxies and spammer servers (both using DNSBLs) appears to be a quicker (< 100 ms) and better way (more spammers blocked) to block spammers. However, using both approaches increases the number of blocked spammers. As for [url=http://b2evolution.net]b2evolution[/url]'s stats (see [url=http://forums.b2evolution.net/viewtopic.php?t=5245]CPU Usage Reduction Hack: Auto pruning of old stats[/url]), I believe [url=http://www.ioerror.us/software/bad-behavior/]Bad Bevahior / Bad Behaviour[/url]'s slowest part is auto prunning of old stats. I'm going to investigate about that issue. (Does anyone know of any free PHP performance analyzer/tunning software?)<!-- Bad Behavior 1.2.2 run time: 0.465 seconds -->
Ouch!
<!-- Bad Behavior 1.2.3 run time: 2.090 seconds -->
Seocnd time around was better.. :)
<!-- Bad Behavior 1.2.3 run time: 0.023 seconds -->
mikkyT wrote:
Ouch!
<!-- Bad Behavior 1.2.3 run time: 2.090 seconds -->Seocnd time around was better.. :)
<!-- Bad Behavior 1.2.3 run time: 0.023 seconds -->
What have you done to improve the speed by a factor of 90?
I do not understand about your Bad Behavior run time.
Accordingly my understanding Bad Behavior should slow down only when a comment/trackback is submitted, but not to slow down posts display.
What is wrong in my undestanding? :-/
Bad Behavior logs either spammers and legitime accesses. Bad Behavior uses the identified spammers log to block already identified spammers even if they fix their scripts to behave otherwise for a given period of time.
Legitime accesses logging is only used by yourself if you want to report a spammer to the author that has not been identified as one. Since 99% of the log are real legitime users, the log tends to increase in size, slows down the script and since you don't report anything, becomes useless. Remove the legitime users logging and you're going to speed up Bad Behavior execution.
Bad behaviour 2 is out, could someone possibly take a look at what needs doing?
As far as I can see theres two extra functions in the generic php script and Im not sure of the change to make (other than the query one).
My old version of BB is starting to fail as the spammers are changing the headers used etc so it needs upgrading.
Hi,
Thanks for the notes on installing to b2evolution... of all the anti-spam solutions, this looks essential.
I following your instructions for 1.9.2 but had to make a few directory and file name changes. But it does not appear to be installing as no dbase changes have been made. I am testing on local host.
1. how do we know this is active?
2. I copy/pasted your code for the bad-behavior-b2evo.php file, but was unclear (sorry). Do we leave all script as is (except for the email address) and then add on your script? or does your script replace certain parts of the file?
Changes for 1.9.2 are:
Hack.php - File Directory path needs to be customised for plugin folder
from:
require_once dirname(__FILE__)."/$conf_dirout/$plugins_subdir/bad-behavior/bad-behavior-b2evo.php"
to:
require_once "$plugins_path/bad-behavior/bad-behavior-b2evo.php"
The script to add hack - load core functions and do initial checks needs to be changed:
from:
require_once(WP_BB_CWD) . "/bad-behavior-core.php");
to:
require_once(WP_BB_CWD) . "/bad-behavior/core.inc.php
(folder and file name change)
Hope this helps someone
Hi,
1.9.2 is parsing errors due to the bb2_insert_head()
I have placed it in the_main.php header with a php...
--
Notice: Undefined variable: screener2 in C:\Documents and Settings\HP_Administrator\My Documents\websites\b2evolution\blogs\plugins\bad-behavior\bad-behavior\post.inc.php on line 42
Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\HP_Administrator\My Documents\websites\b2evolution\blogs\plugins\bad-behavior\bad-behavior\post.inc.php:42) in C:\Documents and Settings\HP_Administrator\My Documents\websites\b2evolution\blogs\plugins\bad-behavior\bad-behavior\screener.inc.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\HP_Administrator\My Documents\websites\b2evolution\blogs\plugins\bad-behavior\bad-behavior\post.inc.php:42) in C:\Documents and Settings\HP_Administrator\My Documents\websites\b2evolution\blogs\inc\VIEW\_menutop.php on line 39
So I have read the entire post and still cannot get anything to work. :oops:
Does this create a table in the database? It looks like it will but so far nothing. All I get when I have the hack.php file on the server is a blank page. I have tried to call the script directly and still the same.... a blank page.
What am I doing wrong? Could it be that I am on a Windows server?
Any suggestions would be welcome. I am running 1.9.2. The spam is annoying and it would be great to stop it.
Thanks in advance for the advice/help.
This hack is not intended to work with the latest b2evolution versions. It works with versions 0.9.x only.
Nice job! -- of ALL of the WP hacks, this is one thats definitely worth porting over. I actually started using this a couple months back, and its taken care of what few spam attempts I havent managed to deter through my hardened .htaccess
Ioerror takes a very intelligent approach in this -- catching spam before it makes it to your blog, and not relying on keywords or content.
Kudos Kwa!