Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Ban Spiders by User Agent Details »»
Ban Spiders by User Agent
Version: 3.1.2, by Simon Lloyd Simon Lloyd is offline
Developer Last Online: May 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 08-08-2011 Last Update: 12-17-2014 Installs: 491
Uses Plugins
 
No support by the author.

What this mod does
With this mod you can enter User Agents to watch or ban, you can also recieve emails or have an Output.txt created and updated with time and date of visits. It doesn't just have to be spiders, you can watch, log or ban any useragent!

How to install
Simply import the product ban_spider, the mod is active by default but none of the other options are turned on.

What is a UserAgent?
http://en.wikipedia.org/wiki/User_agent

Understanding a UserAgent string
http://user-agent-string.info/parse

Genuine User Getting Blocked?
https://vborg.vbsupport.ru/showpost....&postcount=105

Tools to help
http://whatsmyuseragent.com/SwitchingUserAgents.asp
http://www.botsvsbrowsers.com/SimulateUserAgent.asp

FAQ
https://vborg.vbsupport.ru/showpost....&postcount=137

How does it work?
https://vborg.vbsupport.ru/showpost....&postcount=381

What's a bot?
http://en.wikipedia.org/wiki/Spambot

How do i ban a bot?
https://vborg.vbsupport.ru/showpost....&postcount=318
https://vborg.vbsupport.ru/showpost....7&postcount=51

Where's output.txt located?
https://vborg.vbsupport.ru/showpost....&postcount=216

Bad bot lists
https://vborg.vbsupport.ru/showpost....&postcount=259
https://vborg.vbsupport.ru/showpost....&postcount=224
https://vborg.vbsupport.ru/showpost....&postcount=281

Tested on vb3.7.x, vB3.8.x , vB4.x.x but should work on any version.

__________________________________________________ __________________
Special thanks to:
Lior
KH99
BoP5
for helping me sort out a few issues

...and beta testers

ForceHSS (Special thanks to Force for latest testing)
ozzy47
GreyHost

If you use this please mark as INSTALLED

History
9th June 2011 Orginal xml added
12th June 2011 Added both email notification and text file logging
22nd June 2011 Version 2.0.0, Added create thread on activity
  1. Added match facility you can now use something like Yandex and it will match MOZILLA/5.0 (COMPATIBLE; YANDEXBOT/3.0; +HTTP://YANDEX.COM/BOTS)
  2. Added clickable link to visited thread
22nd September 2011 added user redirect url selection
08th October Beta testing started for thread creation.
20th October Beta testing started for emailing.
21st October Beta testing complete Ver 3.0.0 uploaded
29th October minor fix added to cope with empty userid on thread creation
30th October Beta testing automatic redirection to spiders/bots IP
31st October New xml uploaded with automatic redirect to IP
25th November Minor fix for blank forumid fixed
26th November 2011 Fixed version check & create thread Off by default
17th December 2014 Version 3.1.0 uploaded, Hook changed extra logging and statistics added by Ozzy47 (Chris)
18th December 2014 Version 3.1.1 uploaded, prevented spiders being counted when mod turned off.
17th December 2014 Version 3.1.2 uploaded, due to rogue code from another mod
The Bad Bots list is now included in the product
Please prune out all those that you wish to be able to see your site (i suggest you definately prune out "DA" and "Custo" :

Support will now only be given to those who have this mod marked as INSTALLED

Download Now

File Type: xml product-ban_spider4x.xml (30.8 KB, 469 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #232  
Old 11-09-2011, 04:59 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bigtree View Post
Thats a serious list. I would like to get rid of all BS spiders on my site but I worry about ranking? What effect does a list like this have?

How do we tell if a guest is a bad spider?
You can't other than doing lots of net searching, check out honeypot project and sites like that.
Reply With Quote
  #233  
Old 11-09-2011, 09:43 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
If you want to pm me access i'll take a look but it wont be until around 5pm gmt
Thanks ...

Here's a pic of my current "Who is On-line" display showing "Baidu" spiders with the mod active...

Regards,
Doug
Attached Images
File Type: jpg Screen Shot 2011-11-09 at 5.41.38 AM.jpg (30.0 KB, 0 views)
Reply With Quote
  #234  
Old 11-09-2011, 04:39 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doug i see, can you pm me a link to your site..etc, there's nothing much i can do without being able to investigate your site, one thing you might want to check is that you don't have any leading or trailing spaces around the Baidu in your list, so it shouldn't look like this
" Baidu" or "Baidu " (without the quotes of course )
Reply With Quote
  #235  
Old 11-12-2011, 09:16 AM
EasyEazy EasyEazy is offline
 
Join Date: Feb 2011
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just what im looking for. Installed and will see how it goes.

Thank you.
Reply With Quote
  #236  
Old 11-14-2011, 05:50 PM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I recently switched from Apache to Nginx. I used to have an .htaccess that worked great, but Nginx doesn't use em.

This saved me from having to figure out how to do it with Nginx.
Reply With Quote
  #237  
Old 11-16-2011, 03:57 PM
KissOfDeath KissOfDeath is offline
 
Join Date: Dec 2008
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it just spiders this bans or users aswell?

got a few spambots making spam posts for example

AtaTuvisio "173.193.227.141" resolves to 173.193.227.141-static.reverse.softlayer.com, so i've added "static.reverse.softlayer.com" to the list but it does not seem to be doing anything, am i understanding this wrong?

also have some the resolve to "localhost" what do i do about those?
Reply With Quote
  #238  
Old 11-16-2011, 04:19 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Localhost? thats your server then???
If you have banned that useragent then after your WOL timeout (and after they have tried moving to view another thread..etc) will be gone!

Anyway aside from that the resolved UA that you are showing isn't their UA its their IP resolution, go to WOL at the bottom there's a dropdown "Display User Agent" change that to yes and then find them
Reply With Quote
  #239  
Old 11-16-2011, 05:29 PM
KissOfDeath KissOfDeath is offline
 
Join Date: Dec 2008
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
Localhost? thats your server then???
If you have banned that useragent then after your WOL timeout (and after they have tried moving to view another thread..etc) will be gone!

Anyway aside from that the resolved UA that you are showing isn't their UA its their IP resolution, go to WOL at the bottom there's a dropdown "Display User Agent" change that to yes and then find them
Ah i understand now, thanks a lot of the spam posters are mozzila so i guess i can't really ban that, trying to find a ballance that does not wrongfully ban people, tried the plugins that use stopforum spam but the block someone just for using an isp like AOL or Ttiscali and you lose legitimate traffic.....

the local host ones are weird it's not my server the ip address is completely different to my server "113.165.164.99" for example
Reply With Quote
  #240  
Old 11-16-2011, 08:13 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No matter , just ban their UA and you'll be good!
Reply With Quote
  #241  
Old 11-25-2011, 04:00 AM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
To NOT create threads (which of course was my recommendation) then simply uncheck the radio button for "Create Thread"
I installed vB4 version (I followed at first vB3 version). I have vB4.1.2PL4.

I read that someone had problems with "phantom" threads created after installing mod. I too just had this experience.

Of course in settings I selected that threads aren't created at all. Also, I had empty place for forum and user ID.

But threads where created, using user ID 1 (first user I created when installing forum). Forum ID is missing, I see empty name instead forum's name.

All of it I see with Valters Advanced Forum Statiscs: https://vborg.vbsupport.ru/showthread.php?t=235841

It looks like:

Activity from Bot No. 7 (Baidu) in your list 0 0 primus ▲ 25-11, 05:31

Note that the last thing is no forum name, i.e. empty space.

I can't see them in What's New. Or anywhere else in forum. When I try to access them I get error message. I don't know where they are really.

This is link to last one: http://slobodni.net/showthread.php?t...8&goto=newpost

Threads are created, but I don't know where. Also I don't know where can I remove them and how? 6 Threads are created at the moment.

Trying to prevent this, I put forum ID in settings as well as user ID, so I could at least delete threads upon creation.

So, mod creates threads somehow even if option is disabled. How and where, not sure, but I see them.

Interesting thing is, it created only this six threads and at the moment there aren't any new threads. I think there should be more spiders activity from banned bots. Very strange.


EDIT: Just noticed this:

You had this in conditions:
PHP Code:
$vbulletin->options ['bs_report_createthread' 
I just changed this to:
PHP Code:
$vbulletin->options['bs_report_createthread' 
Note there was one space. Not sure if this is bug that caused thread creation or not, but I just removed that one space.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04910 seconds
  • Memory Usage 2,370KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (16)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete