[BETA] Testing - Static URL & SpiderNoSid & AntiSpam

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
ceres
Registered User
Posts: 24
Joined: Mon Mar 04, 2002 2:07 am
Location: Italy
Contact:

[BETA] Testing - Static URL & SpiderNoSid & AntiSpam

Post by ceres » Thu Jan 16, 2003 12:15 am

This mod do basicaly 4 things:

1 - Trasform all url from dynamic to static, i.e.

Code: Select all

http://forum.divxmania.it/viewtopic.php?t=167&start=125&postdays=0&postorder=asc&highlight=CereS

is translated to:

http://forum.divxmania.it/viewtopic.php/t=167/start=125/postdays=0/postorder=asc/highlight=CereS.html
2 - Hide SID to Spiders, non only Google, to *ALL* spiders (about 200, less or more...)

3 - Redirect Email Spam Bots to a fake page (hhihihi)

4 - Add robots.txt to prevent *private* page to be indexed

This mod use an apache function to work (mod_rewrite) so if doesn't work on your webserver U have to ask your webmaster to activate this module.

Actualy I need a little of beta test and someone who can improve the code (even me, if I can find a little of extra time :D )

And now let's do the dirty work :D

Code: Select all

############################################################## 
## MOD Title: Static URL & SpiderNoSid & AntiSpamBot
## MOD Author: ceres < ceres@divxmania.it > (Diego Tibi) http://www.divxmania.it
## MOD Original Author: hsim, Showscout & R. U. Serious
## MOD Description: Transform all url to static and remove session ID for spiders
## ## MOD Version: 1.0.6 BETA
## 
## Installation Level: Easy
## Installation Time: 10 Minutes 
## Files To Edit: (1) session.php
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/ 
############################################################## 
## Author Notes: 
##  
##     This mod need apache web server and mod_rewrite installed 
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
UPDATE 28/01/2003
Download the mod from HERE



Demo site (phpBB 2.0.0 very MOD):
http://forum.divxmania.it/ or http://www.divxmania.it/phpBB2/

Demo site (2.0.4 fresh install):
http://beta.divxmania.it/ or http://beta.divxmania.it/forum/


NB: As you can see this mod work either on relative path (server.com/phpBB) or absolute path (phpBB.server.com) but robots.txt doesn't!
So you MUST upload robots.txt on your http root path and correct pathnames!

Cheers!

.:CereS:. - Italians do it better 8)
Last edited by ceres on Tue Jan 28, 2003 9:27 pm, edited 5 times in total.

User avatar
ceres
Registered User
Posts: 24
Joined: Mon Mar 04, 2002 2:07 am
Location: Italy
Contact:

Post by ceres » Fri Jan 17, 2003 2:36 am

I've updated the code 'cos online statistics doesn't work.

I think code can be improved, but at this moment I'm tired, completly drunk and I'm writing in english...

C U later, I go to sleep!

LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain » Fri Jan 17, 2003 5:04 am

I haven't tried to install (I am not full worried about this) buy you may want to give a URL to download from, or at least rename your file to send email harvesters to. The site bad word list is blocking your filename (so really, just choose a different name, perhaps fNharvester.php or something (a bit more descriptive, and it won't get blocked).
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn » Fri Jan 17, 2003 7:47 am

I think i will install this one by the weekend, sounds interesting. :)

User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR » Fri Jan 17, 2003 8:53 am

:lol: Sounds cool but I'm hung up with this part also?
LifeIsPain wrote: or at least rename your file to send email harvesters to. The site bad word list is blocking your filename (so really, just choose a different name, perhaps fNharvester.php or something (a bit more descriptive, and it won't get blocked).


8O
#-----[ CREATE FILE: /PHPBB-ROOT-PATH/*beep*.php]--


Btw, does this mod replace all the other information passed on in the other "Google - spider..." thread? :arrow: The big one :?:

User avatar
ceres
Registered User
Posts: 24
Joined: Mon Mar 04, 2002 2:07 am
Location: Italy
Contact:

Post by ceres » Fri Jan 17, 2003 2:21 pm

Sorry all.

I've already changed name of this file yesterday, but when I've posted the second version I used the old name... (*beep* was "f o o l b o t u r f u c k e d.php" or something similar...)

I'm working to improve sessions (Who's on line is still faked on phpBB 2.0.0, someone could test on 2.0.4?) and I'm looking for a better mod_rewrite code.

The only way I know to use a simpler code is something like this:

Code: Select all

RewriteEngine on
RewriteMap    map       prg:/mapping.script.pl
RewriteRule ^([^/]+).php/(.*).html$ {map:$1:$2}
All url are fowarded to a cgi script that decode every "/" and trasform it back to "?" and "&"...
There's only a little problem...
I never programmed a cgi script in my life :)

Pheraps someone could try this way, I'm here waiting 8O

User avatar
ceres
Registered User
Posts: 24
Joined: Mon Mar 04, 2002 2:07 am
Location: Italy
Contact:

Post by ceres » Fri Jan 17, 2003 2:28 pm

LaZeR wrote: Btw, does this mod replace all the other information passed on in the other "Google - spider..." thread? :arrow: The big one :?:


Yes, 'cos in this mod I've used the code from that thread modifying to remove sid for all spiders (the list came from awstats).

This mod also sobstitute hsim mod ( http://www.phpbb.com/phpBB/viewtopic.php?t=3344 )

User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR » Fri Jan 17, 2003 9:54 pm

Thanks for the answers and :lol: at that file name. I plan on setting up a 2nd board soon with a fresh 2.0.4 install so I will try this mod then and let you know soon if nobody else does meantime.

User avatar
ceres
Registered User
Posts: 24
Joined: Mon Mar 04, 2002 2:07 am
Location: Italy
Contact:

Post by ceres » Sun Jan 19, 2003 6:21 pm

Anyone tested this mod?

If noone is interested why wasting my time to release a final version...

User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR » Mon Jan 20, 2003 12:40 am

ceres wrote: Anyone tested this mod?

If noone is interested why wasting my time to release a final version...


Promise ASAP I will get my fresh 2.0.4 up and this will be one of the first ones I try :wink: Thanks for the hard work and please keep up the production because this sounds really handy and I am looking forward to trying it soon!

User avatar
ceres
Registered User
Posts: 24
Joined: Mon Mar 04, 2002 2:07 am
Location: Italy
Contact:

Post by ceres » Mon Jan 20, 2003 2:57 am

Don't worry Lazer, I know that U're alredy interested in this!

I'm still working on this mod and I've had a feedback tonight from a Polish user (Bogdan Kowalczyk? Sorry but I doesn't understand your sign) that called me because he's got troubles with memberlist.

I've tried the mod with a modded (too much modded) 2.0.0 and it work perfectly, but I cannot install 2.0.4 before 01/03 ('cos we're rewriting the entire site) and so I cannot test every single problem...

For feedback write here, or by email.

Tnx.

User avatar
ceres
Registered User
Posts: 24
Joined: Mon Mar 04, 2002 2:07 am
Location: Italy
Contact:

Post by ceres » Mon Jan 20, 2003 9:37 pm

Update:

Correct memberlist bug.

Download the mod from HERE

User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR » Tue Jan 21, 2003 1:04 am

Oops :oops: I finally got a 2.0.4 up and was trying this finally but I got to this part of the instructions for sessions.php:

FIND:

Code: Select all

   else 
   { 
      $sessiondata = ''; 
      $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : ''; 
      $sessionmethod = SESSION_METHOD_GET; 
   }
Which I found 2 exact replications of this code so I have no idea which to follow or both?

Also I just noticed this as you listed in the FIND:

Code: Select all

         if ( $ip_check_s == $ip_check_u )
Should be:

Code: Select all

			if ($ip_check_s == $ip_check_u)
Note the lack of spaces around the (brackets) in the original -atleast on mine... makes it tough to find :wink:

User avatar
thatflyersfanguy
Registered User
Posts: 8
Joined: Tue Apr 09, 2002 8:45 pm
Location: PA
Contact:

Post by thatflyersfanguy » Thu Jan 23, 2003 5:50 pm

Nice mod, seems to work fine off of a clean 2.04 install. I added the code after both replications of the code and it appears ok.
If your default main page on your site is not the discussion forum, I would move the check email spammer bots code to the .htaccess in your root. Help protect your entire site, not just your forums.
thatflyersfanguy
FlyersFanCentral

User avatar
ceres
Registered User
Posts: 24
Joined: Mon Mar 04, 2002 2:07 am
Location: Italy
Contact:

Post by ceres » Fri Jan 24, 2003 1:58 pm

thatflyersfanguy wrote: I would move the check email spammer bots code to the .htaccess in your root.


Make a .htaccess in your server root

Code: Select all

#Turn on Rewrite engine
RewriteEngine on

#The next lines check for Email Spammers Robots and redirect them to a fake page
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon   [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf     [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro  [OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker  [OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO     [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector
RewriteRule ^.*$ PHPBB_ROOT/emailsforyou.php  [L]
I found a big bug, I've made a new version, this evening I'll upload to my server.

@Lazer:

Code: Select all

   else 
   { 
      $sessiondata = ''; 
      $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : ''; 
      $sessionmethod = SESSION_METHOD_GET; 
   }
This is refered to the second function, not the first, BTW in the new version I included the exact line to modify.

Post Reply

Return to “[2.0.x] MODs in Development”