PDA

View Full Version : Miscellaneous Hacks - reCAPTCHA!vB


magnus
07-08-2007, 10:00 PM
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.

https://vborg.vbsupport.ru/

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 (http://www.archive.org/).

-
Installation:

Download and unzip the recaptcha101.zip archive.
Upload the functions_recaptcha.php to your /includes/ directory.
Import the product-recaptcha.xml via the Product Manager.
Obtain a FREE public and private reCAPTCHA key here (https://admin.recaptcha.net/accounts/signup/).
Make any desired configuration changes via AdminCP > vBulletin Options > reCAPTCHA Options
Make a backup of your register.php file, located in your forum root.
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)

# 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:

FIND:
eval('$imagereg = "' . fetch_template('imagereg') . '";');

REPLACE WITH:
$imagereg = recaptcha_get_html($vbulletin->options['recaptcha_publickey'], $error);


FIND AND REMOVE:
'imagestamp' => TYPE_STR,
'imagehash' => TYPE_STR,


FIND:
// 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:
// 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 (https://vborg.vbsupport.ru/showpost.php?p=1288719&postcount=31).

-
Tips, tricks and modifications:
Apply "Method A" without shell access (https://vborg.vbsupport.ru/showpost.php?p=1441923&postcount=57) (DOCTOR DAN)
Restore "image verification" frame around reCAPTCHA panel (https://vborg.vbsupport.ru/showpost.php?p=1441932&postcount=58) (DOCTOR DAN)

-
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 (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=magn2o%40comcast%2enet&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8), 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!

nexialys
07-09-2007, 09:20 PM
amazingly brilliant, as usual Magnus !!!

* nexialys send some love !
(my wife will kill me if she knows!)

edit: ah, now it is good, the file !!!

remember to tell to register to get a API key: http://recaptcha.net

FREE

magnus
07-09-2007, 09:47 PM
Woops! Forgot to include an aesthetic template edit. Not having it won't cause any functionality issues, you simply won't be able to change themes.

In order to upgrade, simply re-download and import the latest XML, overwriting your existing one. That's it!

CNBAforo
07-09-2007, 09:54 PM
This is great!!!

magnus
07-09-2007, 09:55 PM
Glad you like. :)

I read about this in the latest Wired magazine, and I just had to put it into vBulletin. :D

Hornstar
07-09-2007, 11:12 PM
very creative putting something like this to good use :)

DJ XtAzY
07-09-2007, 11:34 PM
Suggest this as a default mod built-in to vb v4.0 =]

RvG2
07-10-2007, 02:47 AM
vb4? LOL :)

nice hack!

projectego
07-10-2007, 08:59 AM
Excellent! Thanks a bunch! :D

magnus
07-10-2007, 01:31 PM
I've gone ahead and uploaded a register.patch file, which will allow you to utilize the unix patch system to make the necessary file edits automatically. Simply follow the instructions in the original post if you haven't already made manual file edits.

Be sure to backup your original register.php!

If you ever wish to return to the original CAPTCHA, all you need to do is simply overwrite register.php with the backup you made then uninstall the product. That's it!

Smoothie
07-10-2007, 04:57 PM
I've gone ahead and uploaded a register.patch file, which will allow you to utilize the unix patch system to make the necessary file edits automatically. Simply follow the instructions in the original post if you haven't already made manual file edits.

Be sure to backup your original register.php!

If you ever wish to return to the original CAPTCHA, all you need to do is simply overwrite register.php with the backup you made then uninstall the product. That's it!Could you please explain how the register.patch file works? I read the instructions you posted but I'm not quite sure what it does. Oh and does this work with 3.6.5?

magnus
07-10-2007, 05:07 PM
Could you please explain how the register.patch file works? I read the instructions you posted but I'm not quite sure what it does. Oh and does this work with 3.6.5?

The file register.patch is a GNU patch file. It has the location offsets and changes necessary for the modification to work. Rather than having to edit the file manually, this patch file will do it automatically. If you download the patch file and open it in notepad, you'll get a better understanding of what it's doing. It's basically an automated 'search and replace'.

If the 3.6.5 register.php has a different offset, then the patch file will fail, so you'll need to make the file edits manually in that case.

Either way, none of the changes are irreversable. If something goes awry, you simply overwrite register.php with your backup and you're off and running again. As long as you have a backup of register.php, there's no risk.

Smoothie
07-10-2007, 09:13 PM
One more question. How would this mod be different/better than say a few of the others posted here such as the no spam which has a set of alternating questions a user must answer correctly to register on your site?

magnus
07-11-2007, 10:50 AM
One more question. How would this mod be different/better than say a few of the others posted here such as the no spam which has a set of alternating questions a user must answer correctly to register on your site?

Considering I'm not familiar with the specifics of the modification you're speaking about I can only speculate as to it's functionality.

The benefit to reCAPTCHA is it's something any human can answer. Questions, regardless of how easy they are, may be interpreted wrong due to language barriers or possibly even mental capacity. The goal of a CAPTCHA isn't to test the users knowledge, it's to simply confirm they are human.

One of the added benefits of reCAPTCHA is the fact it takes something as trivial as registering on a forum and uses those "human processes" to do something productive. Helping to translate words that even the best OCR software in the world cannot translate is helping to advance the digitizing of books printed before the digital age.

Not to mention, reCAPTCHA uses 2 words to authenticate humans. One of the words is one that has been proven to be previously untranslated by bots. That's a pretty good security measure, if you ask me. :)

Alibass
07-11-2007, 02:34 PM
@magnus

Very nice hack. One question, I am confused to where I put the
code: # patch -b register.php < register.patch

Does this go in the patch file, register.php or else where?

magnus
07-11-2007, 04:00 PM
@magnus

Very nice hack. One question, I am confused to where I put the
code: # patch -b register.php < register.patch

Does this go in the patch file, register.php or else where?


No, that line is a command that needs to be run from a shell prompt -- provided you have shell access (the '#' indicates a shell prompt, the remaining text is the actual command to be run). Otherwise, you'll need to perform the edits manually as noted in Method B.

Also, please remember that these methods are exclusive of each other. You need to perform either Method A or Method B. Not both!

TheBlackPoet
07-11-2007, 04:29 PM
im not that bright, so i went ahead and manually edited the register page... and i am happy i took the time the stop.. this is very nice.. and replaces another hack i had in place... installed.... nominated

Alibass
07-11-2007, 04:57 PM
No, that line is a command that needs to be run from a shell prompt -- provided you have shell access (the '#' indicates a shell prompt, the remaining text is the actual command to be run). Otherwise, you'll need to perform the edits manually as noted in Method B.

Also, please remember that these methods are exclusive of each other. You need to perform either Method A or Method B. Not both!

I ran and got this error : An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'patch -b register.php < register.patch' at line 1

I still have No Spam! and AjaxReg hacks installed as I wanted to keep them also. Could one or both hacks of these hacks be causing a conflict or should I just try and edit the reg.php manually?

magnus
07-11-2007, 05:04 PM
I ran and got this error : An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'patch -b register.php < register.patch' at line 1

I still have No Spam! and AjaxReg hacks installed as I wanted to keep them also. Could one or both hacks of these hacks be causing a conflict or should I just try and edit the reg.php manually?

Wait, what? Why are you trying to execute the patch via SQL? Forget the patch. Remove any and all reference to it. Do not perform Method A, instead do what's listed in Method B. Perform the file edits manually.

Using the GNU patch method should be reserved for those with basic UNIX knowledge and shell access to their hosts. Everyone else should follow the instructions in Method B.

magnus
07-11-2007, 05:06 PM
im not that bright, so i went ahead and manually edited the register page... and i am happy i took the time the stop.. this is very nice.. and replaces another hack i had in place... installed.... nominated

Glad to hear you go everything works. By the way, I love your forum's header image. It looks great. :)

Alibass
07-11-2007, 06:03 PM
Wait, what? Why are you trying to execute the patch via SQL? Forget the patch. Remove any and all reference to it. Do not perform Method A, instead do what's listed in Method B. Perform the file edits manually.

Using the GNU patch method should be reserved for those with basic UNIX knowledge and shell access to their hosts. Everyone else should follow the instructions in Method B.

Yep, I did Method B and it works fine. *Installed* works great and thanks! :)

Alibass
07-11-2007, 07:39 PM
@magnus

Anyway maybe in your next release you could include the recaptcha to show up when sending mail via clicking "contact us"?

magnus
07-11-2007, 07:50 PM
@magnus

Anyway maybe in your next release you could include the recaptcha to show up when sending mail via clicking "contact us"?


Actually, I have this done already. I'll put up a post with the required file edits.

Smoothie
07-11-2007, 08:41 PM
al-righty then, gonna give this a whirl. :)

Alibass
07-11-2007, 09:22 PM
Actually, I have this done already. I'll put up a post with the required file edits.

Thanks magnus, looking forward to your post.

TTG
07-11-2007, 09:52 PM
Looks like a great addition.
Will it work alongside Ajax Registration (https://vborg.vbsupport.ru/showthread.php?t=144869) ?

magnus
07-11-2007, 09:57 PM
Looks like a great addition.
Will it work alongside Ajax Registration (https://vborg.vbsupport.ru/showthread.php?t=144869) ?

There's no reason for it not to. This simply replaces the default CAPTCHA.

Alibass
07-11-2007, 10:00 PM
Will it work alongside Ajax Registration (https://vborg.vbsupport.ru/showthread.php?t=144869) ?

I can tell you I am using AjaxReg and No Spam! with this hack and it works with no problems. :)

TTG
07-11-2007, 10:16 PM
There's no reason for it not to. This simply replaces the default CAPTCHA.

Installed and working well .. thanks magnus :up:

magnus
07-11-2007, 11:04 PM
Perform the following file edits in order to replace the default CAPTCHA displayed to guests when using "Contact Us" with a reCAPTCHA
-
In sendmessage.php - BE SURE TO MAKE A BACKUP BEFORE EDITING!


FIND:
if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND $vbulletin->options['regimagetype'])
{
require_once(DIR . '/includes/functions_regimage.php');
if (!verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
{
$errors[] = fetch_error('register_imagecheck');
}
}

REPLACE WITH:
if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND $vbulletin->options['regimagetype'])
{
require_once(DIR . '/includes/functions_recaptcha.php');
$resp = recaptcha_check_answer($vbulletin->options['recaptcha_privatekey'],
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid)
{
$errors[] = fetch_error('register_imagecheck');
}
}
FIND AND REMOVE:
if ($imagehash)
{
$db->query_write("DELETE FROM " . TABLE_PREFIX . "regimage WHERE regimagehash = '" . $db->escape_string($imagehash) . "'");
}
FIND:
if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND $vbulletin->options['regimagetype'])
{
require_once(DIR . '/includes/functions_regimage.php');
$imagehash = fetch_regimage_hash();
eval('$imagereg = "' . fetch_template('imagereg') . '";');
}
REPLACE WITH:
if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND $vbulletin->options['regimagetype'])
{
require_once(DIR . '/includes/functions_recaptcha.php');
$imagereg = recaptcha_get_html($vbulletin->options['recaptcha_publickey']);
}
FIND:
// image verification
if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
{
require_once(DIR . '/includes/functions_regimage.php');
$imagehash = fetch_regimage_hash();
eval('$imagereg = "' . fetch_template('imagereg') . '";');
}
REPLACE WITH:
// image verification
if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
{
require_once(DIR . '/includes/functions_recaptcha.php');
$imagereg = recaptcha_get_html($vbulletin->options['recaptcha_publickey']);
}
FIND:
if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
{
require_once(DIR . '/includes/functions_regimage.php');
if (!verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
{
standard_error(fetch_error('register_imagecheck')) ;
}
}
REPLACE WITH:
if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
{
require_once(DIR . '/includes/functions_recaptcha.php');

$resp = recaptcha_check_answer ($vbulletin->options['recaptcha_privatekey'],
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);

if (!$resp->is_valid)
{
standard_error(fetch_error('register_imagecheck')) ;
}
}
FIND AND REMOVE: THERE WILL BE TWO (2) OCCURANCES OF THIS STRING. REMOVE BOTH
'imagestamp' => TYPE_STR,
'imagehash' => TYPE_STR,

Smoothie
07-12-2007, 05:13 AM
Installed, not having much luck changing themes. Is that theme dropdown suppose to work?

Edit: Ok, I tried the 3 themes and the only that shows for me is that butt-ugly red one. :p

magnus
07-12-2007, 10:53 AM
If you're having a problem with themes, chances are the automatic template edit isn't taking effect. Simply make the edit manually.

In the register template:

FIND:
$imagereg

REPLACE WITH::
<script type='text/javascript'>
var RecaptchaOptions = {
theme : "$vboptions[recaptcha_theme]",
tabindex : $vboptions[recaptcha_tabindex]
};
</script>

$imagereg


And, just for good measure you might want to disable the automatic template edit plugin. In AdminCP > Plugins & Products > Plugin Manager look for Automatically modify register template (located under reCAPTCHA!vB) and uncheck the box, then click "Save Active Status".

That should do it!

Alibass
07-12-2007, 04:35 PM
@magnus

Thank you for posting instructions here (https://vborg.vbsupport.ru/showpost.php?p=1288719&postcount=31) on how to make captcha work for guest using "Contact Us" form.

Works great and thanks again. :)

kayakbabe
08-10-2007, 07:22 AM
Would be absolutely great if this could also be used by registred users for things like replies, quick replies, new threads, etc. Even better if it could be used for registered users with less than x postings to their credit. So that it will help drive those manual spammers away.

magnus
08-10-2007, 12:36 PM
Why would you want registered users to be subjected to CAPTCHA's?

pitzerwm
09-07-2007, 06:44 AM
I think that I followed all of the instructions but when I click on "register" it does go to /register.php but its blank. I replace it with the original and its ok. I did the upload etc. and added the keys to the product in the appropriate spaces. I have double and triple checked my typing. Any suggestions?

Thanks

// 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');
}
}

if ($vbulletin->options['regimagecheck'] AND $vbulletin->options['regimagetype'])
{
$imagereg = recaptcha_get_html
($vbulletin->options['recaptcha_publickey'],
$error);
}
else
{
$imagereg = '';
}

magnus
09-07-2007, 11:13 AM
I think that I followed all of the instructions but when I click on "register" it does go to /register.php but its blank. I replace it with the original and its ok. I did the upload etc. and added the keys to the product in the appropriate spaces. I have double and triple checked my typing. Any suggestions?

Thanks

You're missing a close bracket ')' in the following block (highlighted in red):
// 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');
}
}

Also, why are you typing out the code changes manually? Just copy and paste them from the original post to make sure there are no typo's and to retain proper formatting.

pitzerwm
09-07-2007, 04:01 PM
Thanks for your help, I knew that it was something stupid. Works great now. I guess that it was midnight, that I didn't think to cut & paste.

Caerydd
09-08-2007, 02:17 PM
Love this method, love this hack, works flawlessly so far, and much more in keeping with my board ^^

Go you!

magnus
09-09-2007, 01:52 PM
Love this method, love this hack, works flawlessly so far, and much more in keeping with my board ^^

Go you!

Glad you like it! :)

yoyoyoyo
09-16-2007, 01:50 AM
When replying to a message in my forum (http://mysite.com/forum/newreply.php?do=newreply&p=563) I got this error:


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:

$ky = pack('H*', $privkey);

yoyoyoyo
09-17-2007, 02:13 AM
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.

magnus
09-17-2007, 11:21 AM
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(); (http://us.php.net/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. :)

yoyoyoyo
09-17-2007, 12:02 PM
It appears you do not have mcrypt(); (http://us.php.net/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:

https://vborg.vbsupport.ru/external/2007/09/17.jpg

any other suggestions?

bazzup
09-18-2007, 10:49 AM
Installed works great had a mass of bots registering lately and not confirming their emails so hopefully should stop now


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?

yoyoyoyo
09-18-2007, 12:25 PM
thats the second key your private one is'nt it?
why, yes it is! :D maybe that info will help to point out the error I am receiving to magnus. thanks!

GameWizard
09-23-2007, 06:42 AM
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. :rolleyes:

magnus
09-27-2007, 01:47 AM
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. :rolleyes:

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.

GameWizard
09-27-2007, 04:32 AM
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...

bazzup
09-27-2007, 07:11 AM
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

magnus
09-27-2007, 02:45 PM
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...

There are 2 words. The challenge word and the variable word. The variable word can be anything. The challenge word must be typed 100% correctly. There's no 1, 2 or 3 letter minimum. Each challenge word must be 100% accurate.

Regardless of the variable word, this system, at worst, is no less secure than the default CAPTCHA. So there's no concern in that department.

The following is pure speculation, as the exact algorithim is intentionally not divulged:

It's possible that the variable word may have a minimum character requirement as the system may be able to determine the word length while not being able to exactly decipher the actual letters. Again, this is pure speculation on my part.

Godders
10-29-2007, 10:07 PM
Hi there.
I am having some trouble using this.

I have made the changes as directed and placed the private and public keys where requested.
I get the following error
"To use reCAPTCHA you must get an API key from http://recaptcha.net/api/getkey"

Am i missing something? Fantastic script btw I cant wait to use it!

TheInsaneManiac
02-03-2008, 12:50 AM
I like this, but what if I want the Image Verification border to stay there

HP10T
02-11-2008, 07:14 PM
I get an error while importing via the product manager...
Database error in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'Automatically modify register template', 'parse_templates', 'if (isset($vbulletin->templatecache[\'register\']))\r\n{\r\n $find = \' $imagereg\';\r\n \r\n $append = \" <script type=\'text/javascript\'>\r\n var RecaptchaOptions = {\r\n theme : \'\" . $GLOBALS[\'vbulletin\']->options[\'recaptcha_theme\'] . \"\',\r\n tabindex : \" . $GLOBALS[\'vbulletin\']->options[\'recaptcha_tabindex\'] . \"\r\n };\r\n </script>\";\r\n\r\n $vbulletin->templatecache[\'register\'] = str_replace($find, $append . \"\\n\" . $find, $vbulletin->templatecache[\'register\']);\r\n\r\n unset($find, $append);\r\n}', 'recaptcha');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date : Monday, February 11th 2008 @ 02:13:16 PM
Script : http://utahnissans.com/forums/admincp/plugin.php
Referrer : http://utahnissans.com/forums/admincp/plugin.php?do=productadd

magnus
02-11-2008, 08:49 PM
I get an error while importing via the product manager...
Database error in vBulletin 3.5.4:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'Automatically modify register template', 'parse_templates', 'if (isset($vbulletin->templatecache[\'register\']))\r\n{\r\n $find = \' $imagereg\';\r\n \r\n $append = \" <script type=\'text/javascript\'>\r\n var RecaptchaOptions = {\r\n theme : \'\" . $GLOBALS[\'vbulletin\']->options[\'recaptcha_theme\'] . \"\',\r\n tabindex : \" . $GLOBALS[\'vbulletin\']->options[\'recaptcha_tabindex\'] . \"\r\n };\r\n </script>\";\r\n\r\n $vbulletin->templatecache[\'register\'] = str_replace($find, $append . \"\\n\" . $find, $vbulletin->templatecache[\'register\']);\r\n\r\n unset($find, $append);\r\n}', 'recaptcha');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date : Monday, February 11th 2008 @ 02:13:16 PM
Script : http://utahnissans.com/forums/admincp/plugin.php
Referrer : http://utahnissans.com/forums/admincp/plugin.php?do=productadd

Well, you're trying to run a hack developed for vB3.6 on vB3.5 -- that's what happens. :)

If you're feeling frisky, you can edit the .xml and remove references to executionorder. This in no way guaranteed to work. It shouldn't break anything, however, you should always make backups just in case.

If you don't want to edit the file yourself, I've attached a modified .xml. Simply replace the on in the original archive with this.

HP10T
02-12-2008, 05:06 PM
Thanks for the quick reply, I think I am going to upgrade to 3.6 first :).

Doctor Dan
02-13-2008, 02:49 AM
For those who would like to use "Method A" (the register.patch file) to modify their register.php file but do not have shell access (e.g. hosting services that only provide cPanel access), you may find this "trick" useful:

1. Upload the register.patch file to your forum's root directory.

2. Create a plain text file called runpatch.pl with the following contents:

#!/usr/bin/perl
print "content-type:text/html\n\n";
system('patch -b register.php < register.patch');



save it, and upload it to your forum's root directory.

3. Change the permissions on the runpatch.pl file that you just uploaded to 0755 so that you can execute the script.

4. In a web browser, type:

http://yourdomain/yourforum/runpatch.pl

The perl script will run, which in turn runs the patch command.

5. Delete the runpatch.pl file from your forum's root directory.

N.B.: This technique assumes that you can run perl scripts with system calls on the server where your forum resides, which is usually the case.

- Dan

Doctor Dan
02-13-2008, 03:05 AM
A quick mod if you want to restore the "image verification" frame around the reCAPTCHA panel, just like how vBulletin's standard CAPTCHA panel appears:

In the template register find:

$imagereg


and replace it with:


<fieldset class="fieldset">
<legend> $vbphrase[image_verification] </legend>
$imagereg
</fieldset>



You can also center the reCAPTCHA panel within the frame by adding a "<center>" tag:


<fieldset class="fieldset">
<legend> $vbphrase[image_verification] </legend>
<center> $imagereg </center>
</fieldset>



- Dan

magnus
02-13-2008, 01:52 PM
Thanks, Dan! I've linked your tips in the first post. :)

Boofo
02-13-2008, 04:27 PM
You're missing a close bracket ')' in the following block (highlighted in red):
// 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');
}
}

Also, why are you typing out the code changes manually? Just copy and paste them from the original post to make sure there are no typo's and to retain proper formatting.

You mean it's missing in this line, not the other one:

$resp = recaptcha_check_answer ($vbulletin->options['recaptcha_privatekey'],

magnus
02-13-2008, 04:51 PM
You mean it's missing in this line, not the other one:

$resp = recaptcha_check_answer ($vbulletin->options['recaptcha_privatekey'],

No, I mean it's missing from the line I originally mentioned. I highlighted the missing bracket in red.

On a side note, this was months ago and the user found and corrected the problem immediately following. I see no reason to bring it back up. :confused:

Boofo
02-13-2008, 05:25 PM
The only reason I commented was I didn't see a beginning bracket on that line you highlighted the bracket in, in case someone runs in to the same problem later. Since it is your thread, I will let your attitude slide this time and be on my way.

magnus
02-14-2008, 01:54 PM
Uh, excuse me?

I don't see what you're letting me "slide" on -- you posted up information implied as a correction to a post of mine, which helped the user solve his problem, that didn't need any correction. Nevermind the fact that the post was 5+ months old and hasn't had a single question, clarification or comment made towards it until you brought it up.

Why couldn't you have simply hit the post button after your first sentence? Was the second sentence really necessary? What does it add to the topic? How does it benefit the conversation or thread? I don't understand, instead of simply stating you only skimmed and overlooked the detail in question you become defensive and act as if you were going to drop the wrath of God on me but instead decided to grant me a reprieve.

I'm not trying to pick a fight. I'm simply trying to figure out what rule I've broken that you're going to let me slide on "this time". I try to keep the information in my threads factual, so when someone has a problem they can find a fix easily (if available).

Feel free to delete this post as well as the 3 before it.

Doctor Dan
02-14-2008, 08:50 PM
Thanks, Dan! I've linked your tips in the first post. :)


My pleasure. :)

Thank YOU for this very useful vBulletin reCAPTCHA integration! The problem with the standard vB CAPTCHA is that with all the options activated, it frequently generates images which people can't even read.

I think that the most intriguing aspect of reCAPTCHA is that if an automated crack for the obfuscation technique emerges, the reCAPTCHA team at CMU designs a new one, and all sites which use reCAPTCHA are automatically updated.

- Dan

zagman76
02-16-2008, 02:24 AM
Thanks magnus - this is an awesome mod! :)

ChaosBurnt
02-16-2008, 12:00 PM
Thank you very very much magnus, your efforts are greatly appreciated.

*installed very happily*

airaffair
02-16-2008, 02:28 PM
you guys should just do what I did and get rid of captcha all together by going with a session token ....only humans get in and they don't have to do the captcha interpretations ...which is always a negative requirement if you ask me..... just google this "session token instead of captcha" and you guys may find what you want....the down side of what I use is that it requires the users to have java script enabled....but hey, what site doesn't have some sort of java script in it these days right? =)

magnus
02-16-2008, 05:49 PM
Session tokens aren't 100% secure. They're just an alternative method, it all boils down to preference. Either way, if you've already implemented session tokens in place of vB's CAPTCHA -- why not release it here on vB.org for the rest of the community?

rsuplido
02-18-2008, 12:07 AM
Anyone modified search.php too? TIA.

magnus
02-18-2008, 02:12 PM
Replacing any of vB's CAPTCHA with reCAPTCHA is pretty much the same across the board. By looking at the code changes for registration and contact us, you'll see the similarities.

I'll go ahead and whip up a search replacement in my free time and post it up here.

Bloom21
02-20-2008, 04:17 PM
Replacing any of vB's CAPTCHA with reCAPTCHA is pretty much the same across the board. By looking at the code changes for registration and contact us, you'll see the similarities.

I'll go ahead and whip up a search replacement in my free time and post it up here.

Looking forward to this added feature for sure thank you for your efforts magnus!

Martell
02-26-2008, 10:25 AM
Has established on Method B: but nothing is displayed at registration. vBulletin ? v3.6.8 Patch Level 2:confused:
Has returned all back. And standard CAPTCHA was gone.:(

magnus
02-26-2008, 12:52 PM
Has established on Method B: but nothing is displayed at registration. vBulletin ? v3.6.8 Patch Level 2:confused:
Has returned all back. And standard CAPTCHA was gone.:(

This can obviously be attributed to a botched file edit. By "return[ing] all back", I assumed you restored the back-up file?

Martell
02-26-2008, 05:30 PM
magnus, all has understood, Thanks for fashions...

Martell
02-27-2008, 07:20 AM
magnus prompt, whether it is possible as that to translate a window reCAPTCHA on Russian??? :)

magnus
02-27-2008, 05:50 PM
I'm sorry, but I don't exactly understand what you're trying to say. I've gathered that you've got it working, but your last post has me confused.

Selrion
02-27-2008, 06:09 PM
He's trying to know how can he translate the reCAPCHA panel registration interface into Russian... ;)

magnus
02-27-2008, 08:56 PM
Ah! Sure thing. I've updated the modification. Simply download version 1.1.0 above and import the new product xml. There will now be an option in the reCAPTCHA AdminCP settings to select a support language (yes, Russian is supported).

When upgrading from previous versions, you do NOT need to edit any files. Simply import and overwrite.

Enjoy!

Martell
02-28-2008, 05:06 AM
magnus, Thanks:)

CeesT
02-28-2008, 08:17 PM
Thanks Magnus, have just installed it and it works fine.

Only the local-language and color does not work in the 'sendmessage.php' (in register.php this works fine), it has default red-color and english language in sendmessage.php, can I change this somewhere in the code ?

And could you give a recipe what to change for implementing this in 'search.php' ?

magnus
02-28-2008, 10:54 PM
Thanks Magnus, have just installed it and it works fine.

Only the local-language and color does not work in the 'sendmessage.php' (in register.php this works fine), it has default red-color and english language in sendmessage.php, can I change this somewhere in the code ?

And could you give a recipe what to change for implementing this in 'search.php' ?

To add support for themes/language in sendmessage.php, perform the following template edit:

In contactus:

FIND:

$imagereg


REPLACE WITH:
<script type='text/javascript'>
var RecaptchaOptions = {
theme : '$vboptions[recaptcha_theme]',
tabindex : $vboptions[recaptcha_tabindex],
lang : '$vboptions[recaptcha_lang]'
};
</script>

<fieldset class='fieldset'>
<legend>$vbphrase[image_verification]</legend>
$imagereg
</fieldset>


That should do the trick. :)

I haven't done the code for search.php yet, it's on my list.

CeesT
02-29-2008, 07:10 AM
That should do the trick. :)

That worked fine :) , thanks :up:

Dr.H
03-02-2008, 02:50 AM
Hi I'm going to be trying to update my 3.5.4 forum to 3.7 beta but it will take a little while since all I have is ftp access and can't get ssh access from my host yet.
My question is.. is there any chance of this working with 3.5.4? I've turned off my registration until the upgrade but I have people hounding me to join so I wanted to have this security until the upgrade is done.

I looked at my register.php file and can't find:
eval('$imagereg = "' . fetch_template('imagereg') . '";');
So I assume I'm out of luck?

magnus
03-02-2008, 01:03 PM
Not necessarily. It may not be a quick install like with 3.6, however, with a bit of meddling I don't see why it would be all too difficult. Try searching for just "$imagereg =", see if that yields any results.

I'll see if I can download 3.5 later and run through register.php.

Dr.H
03-02-2008, 07:02 PM
I tried searching the file for multiple parts of the line and no luck. It doesn't seem to contain the text. I will see if I can maybe do an upgrade to 3.6.8 before I start the beta.

Nitro212
03-04-2008, 07:14 AM
uh is there a bug in the send message code? i was testing it after a few attempts of saying the words was wrong i refreshed and it sent the message.. i tried this a couple times after 2 or 3 bad attempts i refreshed and the message was sent :/

edit: actually if i leave the field empty it still sends it works fine for the register but not for the contatc us form

magnus
03-04-2008, 11:39 AM
uh is there a bug in the send message code? i was testing it after a few attempts of saying the words was wrong i refreshed and it sent the message.. i tried this a couple times after 2 or 3 bad attempts i refreshed and the message was sent :/

edit: actually if i leave the field empty it still sends it works fine for the register but not for the contatc us form

Ah hah! You are correct. It was a simple typo on my part, sorry.

In sendmessage.php:

FIND:
if ($resp->is_valid)

REPLACE WITH:
if (!$resp->is_valid)

I modified the original post to reflect this change. Thanks for pointing it out! :)

Jazzi
03-17-2008, 01:04 AM
Thanks for your work on this mod - it installed and operated exactly as it should do...

However, I've had to uninstall it again. Why? In my personal opinion it would massively reduce signups to my forum - given that 8 out of 10 of the captcha images are totally impossible to decipher, and the audio alternative almost as bad.

I'm fully aware that neither of these issues aren't your fault of course - it's just a shame that something so obviously brilliant is also so fundamentally flawed.

invitezone
04-10-2008, 03:51 PM
I have successfully added this mod to my board so thankyouverymuch for this.

I was just wondering if it was possible to add the function to the board login as well?
Is this possible?

im am fairly new to vbulletin and editing code etc so if it is coulkd you tell me how to do it please.
Thanks very much

magnus
04-11-2008, 04:55 PM
Yes, it could be added to the board login as well as anywhere else, however, that would require much more work than the scope of this modification was intended for. I'm not even sure there's appropriate custom hooks, so there may possibly be yet more file edits.

So, while yes it can be done, it's really not something I'm planning on implementing nor describing how to do in any great detail, sorry. You best bet would be asking around in Requests For Paid Services (https://vborg.vbsupport.ru/forumdisplay.php?f=30).

invitezone
04-11-2008, 05:15 PM
ok thanks a lot magnus, appreciate the reply

goku93
04-15-2008, 06:52 AM
As can be installed on a forum vbulletin 3.7? Thanks
--------------
como lo puede instalar en un foro vbulletin 3.7 ?Gracias

magnus
04-15-2008, 02:05 PM
As can be installed on a forum vbulletin 3.7? Thanks
--------------
como lo puede instalar en un foro vbulletin 3.7 ?Gracias

As far as I know, vBulletin 3.7 has integrated support for reCAPTCHA which can be enabled via the AdminCP. So, there's no need for this hack on a vB3.7 installation.

goku93
04-17-2008, 03:03 AM
I have not been found, and I tried a lot. : (

markblair
05-07-2008, 05:53 AM
I setup reCaptcha on my vB 3.7 forum and the image verification does not appear to work in IE7. When trying to test the registration using IE7 nothing shows up where reCaptcha should be. Any idea on how to fix this? It works great using Firefox.

David_R
05-07-2008, 06:33 AM
recaptcha words on wikipedia are great. can we have something like that ?

magnus
05-08-2008, 12:22 AM
I setup reCaptcha on my vB 3.7 forum and the image verification does not appear to work in IE7. When trying to test the registration using IE7 nothing shows up where reCaptcha should be. Any idea on how to fix this? It works great using Firefox.


Wait.. what? You installed this hack on vB 3.7? Doesn't vB 3.7 come with reCAPTCHA included by default?

kansei
05-12-2008, 09:41 PM
Wait.. what? You installed this hack on vB 3.7? Doesn't vB 3.7 come with reCAPTCHA included by default?

It does.

I'm wondering, did anyone who used this hack on 3.6 have trouble with the native recaptcha support on 3.7? 3.7 of course significantly changed the structure of the "human verification", making it more modular to support a few styles of verification. With that, it replaced the php file that was modified in this hack with a new version. I just can't get recaptcha working on my 3.5 upgraded to 3.6 upgraded to 3.7 forum but I tested and it works fine on a clean install.

pcxtreme
05-21-2008, 05:23 PM
I am trying to use reCAPTCHA on a 3.6.7 vBulletin, but all I get is an empty "Image verification" space.
https://vborg.vbsupport.ru/attachment.php?attachmentid=81089&stc=1&d=1211394082
What can be the cause of this misbehaviour?

[edit]: problem solved. GD was not enabled in vBulletin. Just enabling it made everything work!

David_R
05-29-2008, 01:12 PM
A quick mod if you want to restore the "image verification" frame around the reCAPTCHA panel, just like how vBulletin's standard CAPTCHA panel appears:

In the template register find:

$imagereg


and replace it with:


<fieldset class="fieldset">
<legend> $vbphrase[image_verification] </legend>
$imagereg
</fieldset>



You can also center the reCAPTCHA panel within the frame by adding a "<center>" tag:


<fieldset class="fieldset">
<legend> $vbphrase[image_verification] </legend>
<center> $imagereg </center>
</fieldset>



- Dan

I have patched my register.php file but cannot find the words $imagereg

Instead I have found this:

if ($vbulletin->options['regimagecheck'] AND $vbulletin->options['regimagetype'])
{
$imagereg = recaptcha_get_html($vbulletin->options['recaptcha_publickey'], $error);
}
else
{
$imagereg = '';
}

KILLERMG
06-11-2008, 01:03 PM
i have one problen in registration

Image verification could not be verified due to server issues. Please try again later.

vb 3.7.1 pl1

edgecutioner
06-12-2008, 05:51 AM
Nice hack magnus!
*edgecutioner clicks install*

i have one problen in registration

Image verification could not be verified due to server issues. Please try again later.

vb 3.7.1 pl1

AFAIK, 3.7 has reCAPTCHA integrated. just have to enable it via ACP

jmellors
06-15-2008, 12:02 PM
how can i get this to work with 3.7.1?

kp^
06-19-2008, 10:14 PM
To those that have 3.7, it's broken..... Read here

http://www.vbulletin.com/forum/showthread.php?t=273320

n00b.gr
06-20-2008, 08:29 AM
Hello! If we have vbulletin 3.7.1 which changes we have to do?

n00b.gr
06-20-2008, 08:46 AM
and GD library must be installed?

Zachery
06-20-2008, 10:02 AM
Can you please add something to your plugin to stop it from being installed into vBulletin 3.7 installations?

ETDC
07-07-2008, 11:52 AM
^ Agreed. Wasted a lot of time today trying to install a plugin for a system that doesn't work in 3.7 anyway.

:)

Zachery
07-08-2008, 12:33 PM
^ Agreed. Wasted a lot of time today trying to install a plugin for a system that doesn't work in 3.7 anyway.

:)
You're aware its a default feature?

ETDC
07-08-2008, 01:35 PM
Yes, but it doesn't work.

Zachery
07-09-2008, 04:02 AM
No, it works just fine.

ETDC
07-09-2008, 04:16 PM
Well, not on my boards it doesn't.

CeesT
07-09-2008, 08:52 PM
Well, not on my boards it doesn't.
The default (build-in VB-3.7) reCAPTCHA works fine, this plugin is not required anymore for VB as it is build in the VB-code now.....

ETDC
07-09-2008, 09:31 PM
Managed to get it to "work" on one board. What's the deal with the sound though - are they playing satanic messages to the hard of hearing?... :down:

Masked Crusader
07-10-2008, 09:12 PM
Alright, did all of the code edits in the register.php file, uploaded the XML and function PHP file, and NOTHING is there when I go into the registration page.

Underneath the header title "Image Verification" there is nothing but white space.

Any suggestions or help would be appreciated.

maniacop
07-13-2008, 03:00 PM
Hello could somebody guide me how to enable this recaptcha thing??
i tought all you have todo was create an acount with them goto ACP-vbulletin options-Human verification and enter the registration info but it doesnt give me any options there to do this...

http://img90.imageshack.us/img90/5612/humanverificationjg0.jpg (http://imageshack.us)
http://img90.imageshack.us/img90/5612/humanverificationjg0.4fe5966582.jpg (http://g.imageshack.us/g.php?h=90&i=humanverificationjg0.jpg)

using vBulletin 3.7.2 PL 1
Help please!

Zachery
07-15-2008, 03:45 AM
THIS MODIFICATION SHOULD NOT BE USED WITH VBULLETIN 3.7 AS IT IS A DEFAULT FEATURE.

Please stop using it.

maniacop
07-15-2008, 04:27 AM
THIS MODIFICATION SHOULD NOT BE USED WITH VBULLETIN 3.7 AS IT IS A DEFAULT FEATURE.

Please stop using it.

Ok i understand that but thats my question how can i enable this??

Thank you.

Nevermind, i know how now... but thanks

Juvefan
07-19-2008, 11:50 PM
How can i integrate this mod with quick register mod??
This is the php code of quick register with image verification

if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['quickregister_active'] == 1)
{
if (($vbulletin->options['quickregister_imgver']) AND ($vbulletin->options['regimagecheck'] AND $vbulletin->options['regimagetype']))
{
require_once(DIR . '/includes/functions_regimage.php');
$imagehash = fetch_regimage_hash();
eval('$imagereg = "' . fetch_template('imagereg') . '";');
}
else
{
$imagereg = '';
}

$show['guest'] = true;
eval('$quickregister = "' . fetch_template('quick_register') . '";');
}

Zachery
07-20-2008, 01:45 PM
THIS MODIFICATION SHOULD NOT BE USED WITH VBULLETIN 3.7 AS IT IS A DEFAULT FEATURE.

Please stop using it.

Juvefan
07-20-2008, 10:58 PM
THIS MODIFICATION SHOULD NOT BE USED WITH VBULLETIN 3.7 AS IT IS A DEFAULT FEATURE.

Please stop using it.

In fact i'm running 3.6.4...

BittyBoy
08-06-2008, 06:20 PM
We have vB 3.7.2 and reCaptcha doesn't work whatsoever, none of the image verification methods either... pants!

Zachery
08-13-2008, 11:51 PM
We have vB 3.7.2 and reCaptcha doesn't work whatsoever, none of the image verification methods either... pants!
This feature is built into 3.7 by default. Do not use this modification.

If you're having a problem with a stock feature please go to vbulletin.com or post in the general vBulletin dicsussion forum.

schnups
10-06-2008, 09:38 AM
Well there is a captcha in the vbulletin by default, but this captcha is already cracked by so many spammers.
Everyday so many bots register at our boards by entering the correct vbulletin captcha....

So does anyone have an idea how to integrate http://recaptcha.net/ into an vbulletin 3.7 ?

Zachery
10-06-2008, 09:57 AM
:rolleyes: Its already in 3.7.

dxlwebs
10-08-2008, 11:09 AM
this is a great addon "Installed" thnx for upping it!

mikelbeck
10-24-2008, 01:19 AM
Does this work on 3.6.8? I've installed it on a few sites, one is 3.6.8 and I don't get the reCAPTCHA box displayed. All of the others it works fine. I even tried the register template edit and it still isn't displayed. Any ideas?

Gin Ichimaru
10-24-2008, 05:20 AM
I installed it late at night and started to get tired. I just couldn't handle another annoying day of bots.

I went with Method B; and I am sure this error is user error. I C&P like you suggested and followed the directions.

I am getting this error message. :
Parse error: syntax error, unexpected T_STRING in .... /register.php on line 851

I will look what line 851 is; but the other co admin and I are super busy this week. So, if you know how to fix the error off the top of your head it would be GREATLY appreciated.

thanks.

mikelbeck
10-26-2008, 05:25 PM
Does this work on 3.6.8? I've installed it on a few sites, one is 3.6.8 and I don't get the reCAPTCHA box displayed. All of the others it works fine. I even tried the register template edit and it still isn't displayed. Any ideas?

Any ideas on this one?

dxlwebs
10-26-2008, 07:27 PM
are you using it on the same server as the other sites if not do you have the required specs for it eg do you have GIDLib (<<<< not sure if i spelt that right) and everything else if so check on a differant template and make sure you do exactly as told as one mistake even a extra letter could stop the system from working!

mikelbeck
10-26-2008, 08:23 PM
are you using it on the same server as the other sites if not do you have the required specs for it eg do you have GIDLib (<<<< not sure if i spelt that right) and everything else if so check on a differant template and make sure you do exactly as told as one mistake even a extra letter could stop the system from working!

Yes, they're all on the same server. It works on some sites but not others. I even tried it on the "default" template on the site that it doesn't work with the same results.

dxlwebs
10-27-2008, 05:48 AM
are you using the say passwords and codes for the other sites because the code is only for one domain name you have to register the other sites sepratly as well!

mikelbeck
10-27-2008, 12:03 PM
are you using the say passwords and codes for the other sites because the code is only for one domain name you have to register the other sites sepratly as well!

Each site has it's own unique reCAPCTHA code, I've verified that.

I will go through the install of the mod again this evening and will see if I screwed something up somehow.

Shoemoney
10-27-2008, 05:28 PM
nice one magn0x

mikelbeck
10-27-2008, 08:55 PM
Each site has it's own unique reCAPCTHA code, I've verified that.

I will go through the install of the mod again this evening and will see if I screwed something up somehow.

I dunno what the problem was, but I went back and uncommented the edits that I had made (to enable this mod) and it's working fine now...

MoJo Smirnoff
11-22-2008, 11:25 PM
614 if (!$resp->is_valid)
615 {
616 $userdata->error('register_imagecheck');
617 }
618 }

with that code in, i get a call to member function error on line 616


if I remove the ! before the $resp in register.php i can actually get the reCapcha image box to pop up, however, it says my email has been banned and that the words i typed in were spelled wrong...and no they were not spelled wrong all 30+ times and different word variations I have tried of this.

ideas?

so far, this is the first thing i've never got to work on vB..hope it's a simple fix because i could really use it.


also, as a side note...per the instructions the below code was never found in my original register.php file

'imagestamp' => TYPE_STR,
'imagehash' => TYPE_STR,

mnymaker
11-23-2008, 04:49 PM
I was getting bombarded with spam and bots so I installed this hack. Lets hope it works.

civicturbo
12-08-2008, 11:56 PM
would this work on 3.0.7?

Zachery
12-12-2008, 11:27 PM
would this work on 3.0.7?
It would be in your own best intrests to upgrade to 3.7. 3.0.7 is insanely old and outdated.

civicturbo
12-14-2008, 03:04 AM
It would be in your own best intrests to upgrade to 3.7. 3.0.7 is insanely old and outdated.

I have the 3.7.4 license, but Im to chicken to do the upgrade

Im afraid I might screw up

Zachery
12-15-2008, 07:03 AM
Your doing more damage to the forums by not upgrading.

ardadora
01-02-2009, 10:05 PM
hi use 3.7.4 in my forum. i imported the producted and uploaded the function file. But there is no "reCaptcha" in "Human Verification Options". But the "reCaptcha" option page shows in the vBulletin options page. Please help me :erm:

Zachery
01-03-2009, 03:39 AM
You should not have imported this in 3.7, uninstall the product.

ardadora
01-03-2009, 09:18 AM
You should not have imported this in 3.7, uninstall the product.

uninstalled it. now what should I do? waiting for help :erm:
here is an secreenshot.

https://vborg.vbsupport.ru/

Grimmwor
01-03-2009, 12:21 PM
Does this work on 3.6.8? I've installed it on a few sites, one is 3.6.8 and I don't get the reCAPTCHA box displayed. All of the others it works fine. I even tried the register template edit and it still isn't displayed. Any ideas?

I am running 3.6.8 and this mod works perfectly for me.

ardadora
01-03-2009, 02:25 PM
uninstalled it. now what should I do? waiting for help :erm:
here is an secreenshot.

http://img61.imageshack.us/img61/9813/96111445sk3.jpg

doesnt anyone know?

Zachery
01-04-2009, 10:47 AM
Are you looking for the reCapcha option in 3.7? If so its under the Human Verification settings, not in the vBulletin Options.

ardadora
01-04-2009, 01:09 PM
Are you looking for the reCapcha option in 3.7? If so its under the Human Verification settings, not in the vBulletin Options.

thanks dude :D

Headsick
01-05-2009, 07:27 PM
Thank you! I'm running 3.6.9, and until now was unable to get the GD image verification to work, but this works flawlessly!

Sworm
01-10-2009, 12:23 PM
Can be possible to use reCAPTCHA on vb 3.8?

Zachery
01-11-2009, 12:43 AM
Can be possible to use reCAPTCHA on vb 3.8?
Default feature in 3.7 and newer versions of vBulletin, if you need help with reCapcha please post on vBulletin.com

odie3
02-20-2009, 11:56 AM
good stuff for my older board - thanks!

doileloi
03-10-2009, 08:12 PM
is this work for 3.81 please help thank you

Zachery
03-11-2009, 08:11 AM
It is a default feature of vBulletin 3.7 and newer (which includes 3.8). Please post on vbulletin.com for more help with reCapcha.

washingtonboise
03-24-2009, 11:19 AM
Instructions:

1. Go to: http://recaptcha.net/ and sign up, write down your public and private key.
2. Go to your forum administration panel
To turn on recaptcha:
Admin CP -> vBulletin Options -> Human Verification Manager
3. select the recaptcha option and click submit.
4. When the page refreshes, the next step you need to do is provide that public and private key. Now you should be set up.

Support
1. Go to: http://www.vbulletin.com/forum
2. Register, (because you can't search until you do)
3. Log in and use the search function to search for 'recaptcha'
4. You will find dozens of posts, read them all to see if your questions are already answered.
5. If not answered, feel free to post.
6. Wait for support.

Best regards

ru55ian
03-28-2009, 11:30 PM
can anyone help with intergration to newreply and newthread on 3.68?

kyrenator
05-04-2009, 01:17 PM
i am using vb 3.8.2! will this hack work for me?

Zachery
05-04-2009, 03:42 PM
i am using vb 3.8.2! will this hack work for me?
No, you need to use the builtin features.

sheep92032
06-01-2009, 08:02 AM
No, you need to use the builtin features.

I don't see any option for this in the default settings.

And the guy that wrote this:

Instructions:

1. Go to: http://recaptcha.net/ and sign up, write down your public and private key.
2. Go to your forum administration panel
To turn on recaptcha:
Admin CP -> vBulletin Options -> Human Verification Manager
3. select the recaptcha option and click submit.
4. When the page refreshes, the next step you need to do is provide that public and private key. Now you should be set up.

There is no recaptcha option. Maybe it was removed?

The recaptcha website is pointing to this thread.

Zachery
06-02-2009, 07:26 AM
I don't see any option for this in the default settings.

And the guy that wrote this:



There is no recaptcha option. Maybe it was removed?

The recaptcha website is pointing to this thread.
What verison of vBulletin are you running?

sheep92032
06-03-2009, 12:42 AM
3.8.2

Zachery
06-03-2009, 07:56 AM
3.8.2
Post on vBulletin.com for support then, I promise you its there.

adiboy.net
06-05-2009, 10:44 AM
does this work with 3.8.2?

mdawg
06-06-2009, 09:57 PM
3.8.2 already has the reCaptcha option standard. Read your vbulletin manual for details.

OKAY - well I just switched from standard image verification to reCAPTCHA. Let's see if that makes a difference.

I've been getting a moderate amount of SPAM - maybe one post a day or so, and we ban the user, ban the IP address, and report the details to
http://www.stopforumspam.com/add
to help others.

Another thing I just modified is that I made it so that even usergroups "Users Awaiting Email Confirmation" and "(COPPA) Users Awaiting Moderation" must "Require Human Verification on Configured Actions," not just "Unregistered / Not Logged In." Maybe this will help.

sheep92032
06-07-2009, 10:21 AM
I also make users post 20 posts before they can post links. After installing reCaptcha i turned the protection off. Within an hour we had 40 posts of spam. I'm guessing the spammers are paying people in some third world country to manually spam.

MRGTB
08-21-2009, 08:00 PM
Does this work OK with the last version of vBulletin 3.6.12

MRGTB
08-23-2009, 02:24 PM
Great hack Magnus, thanks very much. Had forum on-line one week and been getting murdered by spam. Hopefully this will help much more. Seems to work fine with vB 3.6.12

I have a question though, is it possible to install this to not replace the default vBulletin image verification system, but instead to run alongside it as the main image captcha, or as a second image captcha with the default vBulletin verification image system if you enable it for registration. Meaning you can have both displayed if you required image verification in vBulletin 3.6 during registration in the settings. And if you don't, just this is displayed instead.

gr8dude
10-21-2009, 08:08 AM
I've just installed this plugin on my 3.6.0 installation of VBulletin, everything went smooth except that when I try to register I see this error:

Call to undefined function recaptcha_get_html() in register.php line 864

I fixed the problem by doing the following

Made sure the access conditions for the newly uploaded or modified PHP files were set to the same ones as the other PHP files in the same dir (in my case this was 775)
Added the following line to register.php

require_once(DIR . '/includes/functions_recaptcha.php');



This was not in the installations steps described in the beginning, I figured it should work if I add the include manually. It works fine on my end. Thanks for offering this plugin.


I have a question: are there instructions on which modifications to apply to make reCaptcha show up when an anonymous user posts a message? I can try to derive them by studying the original example, but perhaps someone has already gone through this procedure?

TheWhite
10-24-2009, 04:36 AM
A quick mod if you want to restore the "image verification" frame around the reCAPTCHA panel, just like how vBulletin's standard CAPTCHA panel appears:

In the template register find:

$imagereg


and replace it with:


<fieldset class="fieldset">
<legend> $vbphrase[image_verification] </legend>
$imagereg
</fieldset>



You can also center the reCAPTCHA panel within the frame by adding a "<center>" tag:


<fieldset class="fieldset">
<legend> $vbphrase[image_verification] </legend>
<center> $imagereg </center>
</fieldset>



- Dan

i can't get this working can someone post the before and after? regards

GTX2
11-22-2009, 01:00 PM
did everything as described but can't see nothing different in register.php page...
using vb 3.6.4

TheWhite
12-05-2009, 01:50 AM
no one is will to help? geeezee :S

TheWhite
01-03-2010, 02:49 AM
i can't get this working can someone post the before and after? regards
UP!!

Zachery
01-06-2010, 05:45 AM
What version of vBulletin are you running?

FamilyCorner
02-02-2010, 09:44 PM
Will this work on 4.0?

Zachery
02-03-2010, 05:13 PM
No it won't. vB3.8 and newer has this by default.

spankaveli
05-03-2010, 04:12 PM
I can't seem to get this to work in 3.6.7 PL1

I have done uploaded the file into /includes/, made the appropriate changes to register.php and uploaded and installed the attached xml. I have enabled image registration in the admin options and what i'm getting when i try to register is an "Image Verification" frame with nothing inside of it.

ETA: In AdminCP under iamge settings my only options are No, GD and ImageMagick 6

CFCParadox
05-20-2010, 12:25 AM
How do you activate it in vbulletin 3.8.2?

Zachery
05-20-2010, 05:36 AM
AdminCP > vBulletin Options > Human Verification

Tortikova
07-22-2010, 07:02 PM
Anyone know how can add recaptcha to form "Lost password" ?

rdavm
05-03-2011, 09:51 AM
Hi Magnus,

My server dont respond to register.path nor do it respond to the install script runpatch.pl. The browser respond to open or save the file.

Are there any way to make install scripts in a PHP file instead of in a *.pl file?
My server (one.com) dont support .pl scripts

I guess I need do the manual edits but I cant find the line in the "Method B" in my install.php file, running 4.xx

Thanks!

neodesc
07-08-2011, 05:29 PM
Hello,

I've been using this mod for a quite some time now and it used to get the job done until a couple of weeks ago stopped working properly.

Here's what's going on. If you pass the recaptcha everthing goes smoothly. However if you enter the wrong text you will get this message instead of a new recaptcha

An internal error occurred: 4A792ED1857F0.AB4008B.4D7DB63

Appreciate any help ;)

Sworm
07-08-2011, 07:13 PM
Use the Custom Question and you'll not receiv spammers anymore ;)

cupra
09-29-2011, 08:10 PM
Hello,

I've been using this mod for a quite some time now and it used to get the job done until a couple of weeks ago stopped working properly.

Here's what's going on. If you pass the recaptcha everthing goes smoothly. However if you enter the wrong text you will get this message instead of a new recaptcha



Appreciate any help ;)

same here, need some help with that issue...

neodesc
10-07-2011, 11:31 AM
same here, need some help with that issue...

in your register.php find
echo recaptcha_get_html($publickey, $error);
replace it with
echo recaptcha_get_html($publickey);
this fixes it.

cupra
10-09-2011, 08:21 AM
tnx !
are you sure? i cant find recaptcha_get_html($publickey, $error); on the register.php

Zachery
10-11-2011, 11:48 PM
What version of vBulletin are you using?

cupra
10-14-2011, 08:29 AM
What version of vBulletin are you using?

tnx - im using 3.6.5

arossphoto
01-13-2012, 10:36 PM
I've tried installing this in 3.6.4, but like some others here I'm only getting an empty box with the title "Image Verification". I checked Image Settings and it is set to GD.

Any suggestions would be much appreciated.

Eslob
09-10-2012, 08:55 AM
Great Addon ,,, thanks ..