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

Reply
 
Thread Tools
Scheduled Task to Ban BugMeNot Details »»
Scheduled Task to Ban BugMeNot
Version: 1.3, by Zabadab Zabadab is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 05-01-2006 Last Update: 05-05-2006 Installs: 8
Additional Files  
No support by the author.

Warning: Aparently this does not work with the latest vBulletin.

What is it?
One line summary: This "hack" allows you to ban publically shared accounts that come from a website called BugMeNot

More detailed summary: People visit BugMeNot to share accounts from websites that require registration. While this is great for websites such as the New York Times' site (which requires log-in to read articles), it is heavily annoying for forum communities as users will usually use these accounts to grab a bunch of attachments and will never actually contribute anything useful.

What does this script do?
I have written a scheduled task that will visit BugMeNot and retrieve a list of all shared accounts for your forum. All users on this list will then be banned. This is useful for two reasons:
  1. You don't need to visit BugMeNot constantly to manually ban the accounts.
  2. If you enabled attachments, you will be able to cut down on leeching.

What's new?
Version 1.3
  • FIXED: Infinite loop due to BugMeNot changing account listing URL with 301 redirect.
  • ADDED: Option for extra verboseness.
Version 1.2
  • FIXED: Infinite loop when no accounts found due to BugMeNot now returning 404 response code.
  • FIXED: allow_url_fopen php.ini setting is now no longer required to be enabled.
  • FIXED: Rewritten BugMeNot parser to use custom-coded HTML downloader.
Version 1.1
  • Almost a total rewrite incorporating most feedback.
  • Will ban more than the first five accounts now.
  • PHP4 compatibility now. Added a replacement function for array_combine(...)
  • Added checking for safe_mode and allow_url_fopen
Version 1.0
Initial Release

System Requirements
  • PHP >= 4.3.0, PHP >= 5.1.2 recommended.
  • safe_mode off
  • allow_url_fopen on
How do I install this?
Installation is very easy. The following may look like a lot, but they're all very simple steps. Here's what you have to do:
  1. Download the script.
  2. Edit the configuration variables in the file (see the next section)
  3. Extract banbmn.php to your vBulletin "includes/cron/" directory.
  4. Search the Admin CP menu for "Add New Scheduled Task" and click it.
  5. Enter "Ban BugMeNot" in the "Title" field.
  6. Change the hour field to the time your site is the least busy. (4am or something) - Leave all other date/time fields alone.
  7. Enter the path ("./includes/cron/banbmn.php") to the script in the "Filename" field.
  8. Click "Save"
Now run the task for the first time:
  1. In the AdminCP menu, click "Scheduled Task Manager"
  2. Next to the entry "Ban BugMeNot", click on "Run Now"
  3. Wait for the task to finish; the more accounts on your forum are shared, the longer it takes.
  4. Check your scheduled task log for details on what was done.

What can I configure?
Inside the script file is a configuration section where you can configure a variety of options that direct how the script will operate.
PHP Code:
// Usergroup to ban shared accounts to. This needs to be a "bannable group."
$banto 8
This is the group all shared accounts will be banned into. You can find the Group ID with the "Usergroup Manager"
PHP Code:
// Ban reason
$banreason 'How about you sign up for your own account instead of using a shared one?'
This is the reason shared accounts are banend with. People who try to use these accounts will see this message.
PHP Code:
// Custom Title (CT) for someone who is banned
$banct 'Banned BugMeNot Account'
If you want to change the users title along with the ban, you can set the title in this variable. If you leave it blank the title will not be changed.
PHP Code:
// Do you want extra verboseness?
$beverbose FALSE
This will make the script write many more messages into the scheduled task log. You can turn this on when testing the script, but you should turn it off once everything works.
PHP Code:
// Do you want even MORE verboseness? (This will log the returned HTML too!)
// (I added this mainly for me to test if BugMeNot is trying to break my hack again.)
$moreverbose FALSE
Do not enable this. It will make your scheduled task log grow very large. The reason this exists as a setting at all is so you can try and find out why the script locks up. It will log the current loop iteration and the HTML code returned.
PHP Code:
// Check password too?
// Otherwise, a username will be banned regardless of the fact the password is wrong.
// You WANT to leave this set to TRUE unless you have a GOOD REASON not to.
$checkpass TRUE
This setting controls if you want the password of an account to be verified as well. You should really leave this setting alone because if you disable it, anyone can add a valid username to the BugMeNot database (recall that BugMeNot is public and open to anyone) and it will be banned regardless of whether the login information is correct.
PHP Code:
// Don't ban moderators?
// Probably not a good idea seeing as their accounts were shared.. >>;;
$dontbanmods FALSE
If you do not want to ban Administrators, Super Moderators, or Moderators, set this to TRUE. The default value of FALSE is fine, especially if you left password checking enabled.
PHP Code:
// URL to your forums. (The thing you enter on BugMeNot to see accounts for it!) Set
// to AUTO to use what you set in Admin CP.
$bburl 'AUTO'
This is the URL that is checked on BugMeNot. The default value of 'AUTO' is fine.
PHP Code:
// Can the script sleep a bit?
// Tnabling this will make it seem less like a bot to the BugMeNot admins. DO NOT TURN
// THIS ON FOR LOADED SITES!
$dosleep FALSE
This determines if the script will wait between accessing URLs on BugMeNot. If you have a large forum do not turn this on. If you have a low-traffic forum (less than 300 members), you can turn this on to make it less likely that BugMeNot bans you.
PHP Code:
// How long can it sleep?
// 3 - 5 seconds are good values. Anything bigger is dangerous and anything smaller useless.
$sleepmax 3
This determines how long the script waits between accessing URLs. The default value is fine.

Support & Beta Version Infos
Support: I am a fairly busy server administrator but I will try my best in supporting this script. The only thing I ask for is for people to click install.

Beta Version Infos: I could only do limited testing. Reports on how it works (positive and negative) would be nice. Also, please don't be "pissed off" immediately if the script does not work for you. Tell me that it is broken and I will fix it as soon as possible!

Show Your Support

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

Comments
  #32  
Old 11-19-2008, 09:50 PM
1F42 1F42 is offline
 
Join Date: Mar 2003
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one
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 04:18 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.03762 seconds
  • Memory Usage 2,231KB
  • Queries Executed 16 (?)
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
  • (10)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete