vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - reCAPTCHA!vB (https://vborg.vbsupport.ru/showthread.php?t=151824)

magnus 09-27-2007 02:45 PM

Quote:

Originally Posted by GameWizard (Post 1347953)
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/adminc...?do=productadd

magnus 02-11-2008 08:49 PM

Quote:

Originally Posted by HP10T (Post 1440986)
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/adminc...?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:

Code:

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

Code:

$imagereg

and replace it with:

Code:

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

Code:

<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

Quote:

Originally Posted by magnus (Post 1334161)
You're missing a close bracket ')' in the following block (highlighted in red):
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');
        }
    }

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:

Code:

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


All times are GMT. The time now is 01:04 AM.

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

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

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete