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

Reply
 
Thread Tools
reCAPTCHA!vB Details »»
reCAPTCHA!vB
Version: 1.1.0, by magnus magnus is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.7 Rating:
Released: 07-08-2007 Last Update: 02-26-2008 Installs: 207
Uses Plugins Auto-Templates
Code Changes Additional Files  
No support by the author.

THIS MODIFICATION SHOULD NOT BE USED WITH VBULLETIN 3.7+ AS IT IS A DEFAULT FEATURE.

Keywords: reCAPTCHA, CAPTCHA, spam, register

Description:
This modification will replaced the default vBulletin registration CAPTCHA with the newer, more advanced reCAPTCHA.

What is CAPTCHA/reCAPTCHA?:
A CAPTCHA is a program that can tell whether its user is a human or a computer. You've probably seen them ? colorful images with distorted text at the bottom of Web registration forms. CAPTCHAs are used by many websites to prevent abuse from "bots," or automated programs usually written to generate spam. No computer program can read distorted text as well as humans can, so bots cannot navigate sites protected by CAPTCHAs.

About 60 million CAPTCHAs are solved by humans around the world every day. In each case, roughly ten seconds of human time are being spent. Individually, that's not a lot of time, but in aggregate these little puzzles consume more than 150,000 hours of work each day. What if we could make positive use of this human effort? reCAPTCHA does exactly that by channeling the effort spent solving CAPTCHAs online into "reading" books.

To archive human knowledge and to make information more accessible to the world, multiple projects are currently digitizing physical books that were written before the computer age. The book pages are being photographically scanned, and then, to make them searchable, transformed into text using "Optical Character Recognition" (OCR). The transformation into text is useful because scanning a book produces images, which are difficult to store on small devices, expensive to download, and cannot be searched. The problem is that OCR is not perfect.



reCAPTCHA improves the process of digitizing books by sending words that cannot be read by computers to the Web in the form of CAPTCHAs for humans to decipher. More specifically, each word that cannot be read correctly by OCR is placed on an image and used as a CAPTCHA. This is possible because most OCR programs alert you when a word cannot be read correctly.

But if a computer can't read such a CAPTCHA, how does the system know the correct answer to the puzzle? Here's how: Each new word that cannot be read correctly by OCR is given to a user in conjunction with another word for which the answer is already known. The user is then asked to read both words. If they solve the one for which the answer is known, the system assumes their answer is correct for the new one. The system then gives the new image to a number of other people to determine, with higher confidence, whether the original answer was correct.

Currently, we are helping to digitize books from the Internet Archive.

[hr]-[/hr]
Installation:
  1. Download and unzip the recaptcha101.zip archive.
  2. Upload the functions_recaptcha.php to your /includes/ directory.
  3. Import the product-recaptcha.xml via the Product Manager.
  4. Obtain a FREE public and private reCAPTCHA key here.
  5. Make any desired configuration changes via AdminCP > vBulletin Options > reCAPTCHA Options
  6. Make a backup of your register.php file, located in your forum root.
  7. Perform ONE (1) of the following methods:
    • Method A:
      • Download the register-patch.zip archive, extract, then upload the register.patch file to your forum root, then apply the patch:

        *Note: Please note that this method requires a basic understanding of UNIX shell commands and requires shell access to your host. If you do not have either of these or you are unsure how to use GNU patch, I highly suggest performing Method B instead)

        Code:
        # patch -b register.php < register.patch
        This will perform the file edits automatically. Once finished, you may delete the register.patch file.
    • Method B:
      Perform the following simple file edits:
      • IN register.php:
        1. FIND:
          PHP Code:
          eval('$imagereg = "' fetch_template('imagereg') . '";'); 
          REPLACE WITH:
          PHP Code:
          $imagereg recaptcha_get_html($vbulletin->options['recaptcha_publickey'], $error); 
        2. FIND AND REMOVE:
          PHP Code:
                          'imagestamp'          => TYPE_STR,
                          
          'imagehash'           => TYPE_STR
        3. FIND:
          PHP Code:
                  // Check Reg Image
                  
          if ($vbulletin->options['regimagecheck'] AND $vbulletin->options['regimagetype'])
                  {
                          require_once(
          DIR '/includes/functions_regimage.php');
                          if (!
          verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
                          {
                                  
          $userdata->error('register_imagecheck');
                          }
                  } 
          REPLACE WITH:
          PHP Code:
                  // Check Reg Image
                  
          if ($vbulletin->options['regimagecheck'] AND $vbulletin->options['regimagetype'])
                  {
                          
          $resp recaptcha_check_answer ($vbulletin->options['recaptcha_privatekey'],
                                                          
          $_SERVER["REMOTE_ADDR"],
                                                          
          $_POST["recaptcha_challenge_field"],
                                                          
          $_POST["recaptcha_response_field"]);

                          if (!
          $resp->is_valid)
                          {
                                  
          $userdata->error('register_imagecheck');
                          }
                  } 

NOTE: YOU MAY ALSO REPLACE THE CAPTCHA DISPLAYED TO GUESTS WHEN USING THE "CONTACT US" FORM BY FOLLOWING THE INSTRUCTIONS HERE.

[hr]-[/hr]
Tips, tricks and modifications:
[hr]-[/hr]
Comments:
As with all my hacks, this modification is provided free of charge. However, if you find this product useful and have money burning a hole in your pocket, feel free to make a small donation, I won't mind.. really.

Version History:
  • 1.0.0 - Initial release, here's to hoping...
  • 1.0.1 - Woops! Forgot to include a aesthetic template edit in the original release. All is well, simply redownload and overwrite the XML. That's it!
  • 1.1.0 - Added alternate language support. Now various reCAPTCHA tags and text will be displayed in your selected language. Also added a fieldset to the automatic template edits around the display block for a more uniform look (thanks DOCTOR DAN!).

Currently Known Bugs:
  • None

* Please note that this modification was developed on a forum with a userbase of 1 (myself). I've tested it for basic functionality but I cannot guarantee functionality or behavior on your forum. So, please -- make backups before installing this product!

Show Your Support

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

Comments
  #42  
Old 09-16-2007, 01:50 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When replying to a message in my forum (http://mysite.com/forum/newreply.php?do=newreply&p=563) I got this error:

Quote:
Warning: pack() [function.pack]: Type H: illegal hex digit L in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit n in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit X in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit g in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit k in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit z in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit S in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit y in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit y in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit x in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit o in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit V in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit q in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit u in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit m in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit O in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit S in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit U in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit h in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit w in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit i in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit L in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit n in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit X in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit g in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit k in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit z in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit S in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit y in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit y in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit x in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit o in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit V in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit q in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit u in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit m in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit O in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit S in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit U in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit h in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit w in /includes/functions_recaptcha.php on line 235

Warning: pack() [function.pack]: Type H: illegal hex digit i in /includes/functions_recaptcha.php on line 235
this is line 235 in /includes/functions_recaptcha.php:

PHP Code:
$ky pack('H*'$privkey); 
Reply With Quote
  #43  
Old 09-17-2007, 02:13 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea what is causing that error? I would love to turn this back on in my forum, but can't with that message popping up all the time.
Reply With Quote
  #44  
Old 09-17-2007, 11:21 AM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo View Post
Any idea what is causing that error? I would love to turn this back on in my forum, but can't with that message popping up all the time.
It appears you do not have mcrypt(); support enabled within PHP.

To be sure, check AdminCP > Maintenance > View PHP Info. Now look for a section titled mcrypt. If it's not there, that's your answer.
Reply With Quote
  #45  
Old 09-17-2007, 12:02 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by magnus View Post
It appears you do not have mcrypt(); support enabled within PHP.

To be sure, check AdminCP > Maintenance > View PHP Info. Now look for a section titled mcrypt. If it's not there, that's your answer.
I have mcrypt enabled:



any other suggestions?
Reply With Quote
  #46  
Old 09-18-2007, 10:49 AM
bazzup bazzup is offline
 
Join Date: Dec 2006
Location: Liverpool
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed works great had a mass of bots registering lately and not confirming their emails so hopefully should stop now


Quote:
Originally Posted by yoyoyoyo View Post
Any idea what is causing that error? I would love to turn this back on in my forum, but can't with that message popping up all the time.
thats the second key your private one is'nt it?
Reply With Quote
  #47  
Old 09-18-2007, 12:25 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bazzup View Post
thats the second key your private one is'nt it?
why, yes it is! maybe that info will help to point out the error I am receiving to magnus. thanks!
Reply With Quote
  #48  
Old 09-23-2007, 06:42 AM
GameWizard's Avatar
GameWizard GameWizard is offline
 
Join Date: Apr 2004
Location: Vancouver, BC
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Either I'm missing something, or this script is messed up?

After installing the script, and using Method B. I attempted to register on my board a few times to see how it would react, and it appears to allow the registration if the first few characters of the first word are correct, or simply resemble that of the first word.

It seems to not care what the rest looks like. Although it doesn't let me pass if the first 3-4 characters are completely different. What the hell? lol.
Reply With Quote
  #49  
Old 09-27-2007, 01:47 AM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GameWizard View Post
Either I'm missing something, or this script is messed up?

After installing the script, and using Method B. I attempted to register on my board a few times to see how it would react, and it appears to allow the registration if the first few characters of the first word are correct, or simply resemble that of the first word.

It seems to not care what the rest looks like. Although it doesn't let me pass if the first 3-4 characters are completely different. What the hell? lol.
There are 2 words. One of which the system knows, the other which the system is unsure of. The entire point is to present multiple words that are readable to humans, but proven unreadable by bots. So as long as you answer the actual key word correctly, you could technically input whatever you wanted for the variable word.

Again, this is something you, as a human, can logically determine. A bot will see a mass of letters an be unable to differentiate them. The main goal of reCAPTCHA is to provide a next level of spam bot prevention while using wasted human cycles (re: distributed human computing) to help translate books to digital text.
Reply With Quote
  #50  
Old 09-27-2007, 04:32 AM
GameWizard's Avatar
GameWizard GameWizard is offline
 
Join Date: Apr 2004
Location: Vancouver, BC
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But i find it confusing how yes, it makes it easier for humans, but at the same time could potentially make it easier for bots as well, could it not? All the bot would need to do is identify that your script is being used then attempt to read the word(s) which don't even need to be typed correctly! The first 3 letters or so seem to be the only requirement, the rest can be neglected or mistyped and the script still allows the user to continue...
Reply With Quote
  #51  
Old 09-27-2007, 07:11 AM
bazzup bazzup is offline
 
Join Date: Dec 2006
Location: Liverpool
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GameWizard View Post
But i find it confusing how yes, it makes it easier for humans, but at the same time could potentially make it easier for bots as well, could it not? All the bot would need to do is identify that your script is being used then attempt to read the word(s) which don't even need to be typed correctly! The first 3 letters or so seem to be the only requirement, the rest can be neglected or mistyped and the script still allows the user to continue...
well i have had this for over a week now i think and i was having 20+ bots a day registering and not confirming their emails and all this has stopped.

yes they will learn the script but until then this is working mighty fine for me
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 01:40 AM.


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.04929 seconds
  • Memory Usage 2,366KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_code
  • (6)bbcode_php
  • (7)bbcode_quote
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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