Brain Goo

Carpe Crap ‘em

Brain Goo header image 4

Entries from June 2007

Stop spam-bots in PHPBB 2.x. Cheap, easy BOT stopper

June 5th, 2007 · No Comments

WARNING!  As of this writing, this information pertains to the 2.x branch of phpBB.  I strongly recommend you upgrade to the latest phpBB.  As of April 28, 2009 that version is 3.0.4.  Please see http://phpbb.com
NOTICE: I have an updated phpBB patch for the 3.0.x version of phpBB.  Please search this blog for phpBB or look [...]

[Read more →]

Tags: How Tos · php · phpbb · spam

Perl code to find an IP A in subnet B/C

June 5th, 2007 · No Comments

my $ip = ‘1.2.3.4′;
my $block1 = ‘1.2.3.0/27′;

if(checkip($ip, $block1)) {
print STDOUT “$ip is in $block1\n”;
}
else {
print STDOUT “$ip is not in $block1\n”;
}

sub checkip() {
my $ip = shift;
my $block = shift;

@ip1 = split(/\./, $ip);
[...]

[Read more →]

Tags: How Tos · Programming · ip addressing · ipv4 · networking · perl