vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Ban Spiders by User Agent (https://vborg.vbsupport.ru/showthread.php?t=268208)

ozzy47 12-18-2014 12:07 AM

Ok, was this happening in 3.1.0?

I.G.O.T.A. 12-18-2014 12:09 AM

Quote:

Originally Posted by Gadget_Guy (Post 2527811)
Hate to be the one to have to say this.

My site just started throwing these errors:

Database error in vBulletin 4.2.2:

Invalid SQL:

UPDATE `bad_bots_blocked` SET ban_useragent = ban_useragent + 1;

MySQL Error : Table 'subaru_test.bad_bots_blocked' doesn't exist
Error Number : 1146
Request Date : Wednesday, December 17th 2014 @ 08:11:41 PM
Error Date : Wednesday, December 17th 2014 @ 08:11:41 PM
Script : http://www.toronto-subaru-club.com/f.../index.php?how
Referrer :
IP Address : 5.255.253.29
Username :
Classname : vB_Database_MySQLi
MySQL Version :


D.

Ditto same here. Never had this before.

ozzy47 12-18-2014 12:15 AM

I see the issue, use this XML for now. I had one of my own updates to my own table in the XML, that should not have been in there.

ozzy47 12-18-2014 12:17 AM

Simon can grab that XML, and update the OP when he comes on. :)

Gadget_Guy 12-18-2014 02:14 AM

So far so good with the new file.

D.

Simon Lloyd 12-18-2014 05:12 AM

New xml uploaded. Ozzy can you remove the in post ones to save confusion for people looking back through the thread?

Black Snow 12-18-2014 07:49 AM

Thanks for the update. I can't see any stats in the site statistics on the forum home.

EDIT: It works fine on my test forum. I am running vBOptomise and Total Online Time which both add stats below the "Welcome to our newest member" stats so unsure if this is causing an issue.

EDIT: I disabled vBOptomise and the stats popped up straight away.
Quote:

Spiders/Bots Activity Blocked From Site: 6
Maybe worth a look into the conflict Simon?

Simon Lloyd 12-18-2014 07:57 AM

Vboptimise is a caching mod, its possible that either you have to wait for the cache update or its using the same hook or template replacement. Ill check when i get home later.

Black Snow 12-18-2014 08:05 AM

I cleared the cache to check if it would update but no luck.

aicel 12-18-2014 08:59 AM

in Vb 5.1 new release don't work, i return to old release and work fine

ozzy47 12-18-2014 09:24 AM

Quote:

Originally Posted by Black Snow (Post 2527874)
Thanks for the update. I can't see any stats in the site statistics on the forum home.

EDIT: It works fine on my test forum. I am running vBOptomise and Total Online Time which both add stats below the "Welcome to our newest member" stats so unsure if this is causing an issue.

EDIT: I disabled vBOptomise and the stats popped up straight away.

Maybe worth a look into the conflict Simon?

I am running vBoptimize and the stats show fine for me. :confused:

ozzy47 12-18-2014 09:26 AM

Quote:

Originally Posted by aicel (Post 2527881)
in Vb 5.1 new release don't work, i return to old release and work fine

This mod is for vB4 not vB5, it will not work in that version at all, as the required hook system is not available.

ozzy47 12-18-2014 09:27 AM

Quote:

Originally Posted by Simon Lloyd (Post 2527860)
New xml uploaded. Ozzy can you remove the in post ones to save confusion for people looking back through the thread?

Done. :)

Black Snow 12-18-2014 10:17 AM

Quote:

Originally Posted by ozzy47 (Post 2527883)
I am running vBoptimize and the stats show fine for me. :confused:

If I disabled the mod then the bots blocked shows or if I choose not to show how many queries it has saved me on forumhome, then blocked shows

ozzy47 12-18-2014 10:20 AM

That is weird, I have the queries showing on forum home, as well as the stats from this mod, and they both show.

What happens if you disable the Time Online mod?

Black Snow 12-18-2014 10:52 AM

Quote:

Originally Posted by ozzy47 (Post 2527891)
That is weird, I have the queries showing on forum home, as well as the stats from this mod, and they both show.

What happens if you disable the Time Online mod?

If I disable the time mod it doesnt show. It will ONLY show if I disable the vBOptomise mod OR turn off the option to display the saved queries on forumhome.

ozzy47 12-18-2014 10:54 AM

I don't get it, :confused: . If you want. PM me a admin account, and I can try and figure out what is different between your site and my site, since I have it showing, and you don't. I can look into it later today when I get home from work.

sarasotarepub 12-18-2014 12:13 PM

Just installed the latest update, looks good!

Gadget_Guy 12-18-2014 12:27 PM

It's working great here as well.

Question: Having a look at my "Guests" block on the home page.... I take it you updated things so that the blocked bots are no longer showing in there?

D.

Simon Lloyd 12-18-2014 12:39 PM

Blocked bots shouldn't show anywhere except in stats...etc

Gadget_Guy 12-18-2014 05:39 PM

Quote:

Originally Posted by Simon Lloyd (Post 2527915)
Blocked bots shouldn't show anywhere except in stats...etc

Awesome!

D.

Gadget_Guy 12-18-2014 05:41 PM

1 Attachment(s)
Based on this screen capture from today.... would you recommend I add anything additional to my list in the mod?

D.

ozzy47 12-18-2014 08:12 PM

Quote:

Originally Posted by Gadget_Guy (Post 2527950)
Based on this screen capture from today.... would you recommend I add anything additional to my list in the mod?
D.

Looks fine to me. :)

bzcomputers 12-18-2014 08:23 PM

Was averaging about 400 Baidu bots a day still getting through before this last update. Now after 24 hours I'm seeing zero. Thanks!

ozzy47 12-18-2014 08:24 PM

Excellent, glad to hear it is stopping them for you. :)

princesspepper 12-19-2014 08:05 AM

Quote:

Originally Posted by ozzy47 (Post 2527624)
Simon has the changes, when he has time he will go over it, and if he wants, release a update. :)

Quote:

Originally Posted by Simon Lloyd (Post 2527692)
Ozzy47's xml has been uploaded and an update sent out, thanks Chris nice work! :)

Thanks guyz!

Black Snow 12-19-2014 08:37 AM

I'm working on a way to log all the blocked bots. Not sure if it will record every instance or just a total number for each bot. Will share my findings when I'm done.

ozzy47 12-19-2014 09:16 AM

Say what? This is already recording the blocked bots. In four different possible ways, in a log file, in a thread, in a email and the bots blocked count.

Now writing each bot individually to the DB, is not a good idea, as the table would grow too big, and be a giant PITA when you query it to get the info. Think about it, in just five days, only blocking baidu, I have a count of 9062.

Now lets take that and round it to 10,000 for seven days. Lets say I am going to block the 281 bots I have in my list. 281 x 10,000 x 52 = 146,120,000 entries a year. :eek:

Sure each bot is not going to hit me 10,000 times a week, but you can see, this can really grow fast. ;)

And my site is not that busy, now imaginge on a busy site, the entries to the table in the DB could be 250,000,000 plus a year. Now run a query to retrieve the info from that table, and it would hurt the site every time it is ran. :mad:

IMO, the best way to go is how it is now, just increase the count every time a bot is blocked, and get that number and display it. :)

Simon Lloyd 12-19-2014 09:45 AM

Yep, you'd have to list every bot in the database then increment it's count every time you block it, that would be the easier way but your actually talking about constantly querying the database with redas and writes - definitely not a good idea, save your resources for your members.

ozzy47 12-19-2014 09:48 AM

Yes, I know Simon, I thought about doing it that way also, but the payoff, is not worth the trouble. It would bloat the mod, and become a resource hog in no time. :)

Simon Lloyd 12-19-2014 09:53 AM

Quote:

Originally Posted by ozzy47 (Post 2528011)
Yes, I know Simon, I thought about doing it that way also, but the payoff, is not worth the trouble. It would bloat the mod, and become a resource hog in no time. :)

Thats what i'm saying, if all they want to do with their forums is watch bots/spiders (and thats not what the mod is about) then they'll have hours and hours of fun but no members as the forum would slow down to a snails pace.

People, just rest assured that the mod is doing it's job and giving you back valuable resources please dont waste them again by trying to build in fancyful functionality thats really a whim and not a must have :D

ozzy47 12-19-2014 09:56 AM

Exactly, which is why I only made it a count of total blocked, it's quick to write, and quick to read and display the count.

I used the analogy, KISS, keep it simple stupid. :)

Simon Lloyd 12-19-2014 09:58 AM

Quote:

Originally Posted by ozzy47 (Post 2528013)
Exactly, which is why I only made it a count of total blocked, it's quick to write, and quick to read and display the count.

I used the analogy, KISS, keep it simple stupid. :)

:mad: who you calling stupid????? Lol!

ozzy47 12-19-2014 10:01 AM

I call myself stupid all the time, when I am writing code. :p

Simon Lloyd 12-19-2014 10:25 AM

Quote:

Originally Posted by ozzy47 (Post 2528015)
I call myself stupid all the time, when I am writing code. :p

Haha!, i hear ya!

Black Snow 12-19-2014 11:35 AM

Quote:

Originally Posted by ozzy47 (Post 2528007)
Say what? This is already recording the blocked bots. In four different possible ways, in a log file, in a thread, in a email and the bots blocked count.

Now writing each bot individually to the DB, is not a good idea, as the table would grow too big, and be a giant PITA when you query it to get the info. Think about it, in just five days, only blocking baidu, I have a count of 9062.

Now lets take that and round it to 10,000 for seven days. Lets say I am going to block the 281 bots I have in my list. 281 x 10,000 x 52 = 146,120,000 entries a year. :eek:

Sure each bot is not going to hit me 10,000 times a week, but you can see, this can really grow fast. ;)

And my site is not that busy, now imaginge on a busy site, the entries to the table in the DB could be 250,000,000 plus a year. Now run a query to retrieve the info from that table, and it would hurt the site every time it is ran. :mad:

IMO, the best way to go is how it is now, just increase the count every time a bot is blocked, and get that number and display it. :)

I understand where you are coming from but that is not my intention completely. I will log, for example, Baidu into the database and each time it is blocked, the count will go up by one. I just want to be able to query the DB to see a list of all blocked bots and how many times it was blocked. The log, output.txt, is messy IMHO and I want to be able to query the bots list.

ozzy47 12-19-2014 11:43 AM

I can see that, but as described, that is still going to be something that is totally un necessary, and still slow things down, on a busy site. :)

But it is cool in theory, I started to do just that, but decided against it as I was going along, and found the best thing was to have a running count total. People don't care how many times not X was blocked, just as long as it was blocked. :)

too_cool_3 12-19-2014 08:52 PM

I have one question regarding Ban Spiders by User Agent. Since many of the User Agent's in the lists contain words like 'bot', 'spider' and 'crawl', will enabling the option Ban Spiders in List ban even good spiders from the forum???

e.g.
Google Spider (crawl-66-249-75-154.googlebot.com)
BingBot Spider (msnbot-157-55-39-186.search.msn.com)

ozzy47 12-19-2014 08:53 PM

It will only ban spiders you have listed, not all spiders.

Simon Lloyd 12-20-2014 05:39 AM

Quote:

Originally Posted by too_cool_3 (Post 2528080)
I have one question regarding Ban Spiders by User Agent. Since many of the User Agent's in the lists contain words like 'bot', 'spider' and 'crawl', will enabling the option Ban Spiders in List ban even good spiders from the forum???

e.g.
Google Spider (crawl-66-249-75-154.googlebot.com)
BingBot Spider (msnbot-157-55-39-186.search.msn.com)

I've explained this many many times throughout all the Ban Spiders By UserAgent threads, take a look here for the latest explanation https://vborg.vbsupport.ru/showpost....&postcount=652


All times are GMT. The time now is 03:28 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02073 seconds
  • Memory Usage 1,829KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete