MyBB Community Forums

Full Version: Image_verification-- captcha
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Dear Sir,

Could you tell me how to delete some charactors of captcha.php
For example:

0 (digital) and o
1 (digital) and l
9 (digital) and q


Regads!
In inc/functions.php, you can find:
$set = array("a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J","k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T","u","U","v","V","w","W","x","X","y","Y","z","Z","1","2","3","4","5","6","7","8","9");
and change it to your liking.

It'll have a very minor effect a few other things, but nothing important.
Dear ZiNgA BuRgA,

Thanks your inform.

Could you tell me more detail about the space between charactor and next charactor?

Regards!
Check the $spacing variable in captcha.php
Dear DennisTT,

Thanks your comments.

I change it to $spacing =$img_width/5 or $spacing =5, but it's not look better.

It's a easy reading code for new registration, no difficult, no confuse, and anti-SPAM, so I hope it is a eight-charactors and look better as

1 2 3 4 5 6 7 8

Could you give me more comments?

Regards!
I modify it as below or attached.
Welcome anyone give me your comments, thanks!
+------------------------------------------------------------------------------------------------+
| MyBB  image_verification for any version.                              2008-06-13     |
| It's a easy reading code for new registration, no difficult, no confuse,             |
| and anti-SPAM. It will show you as 1 2 3 4 5 6 7                                             | 
| Please follow the instructions documented to manually patch your board.       |
+------------------------------------------------------------------------------------------------+



===============
1. captcha.php
===============


Find:
--
		$img_width = 200;
		$img_height = 60;
		// The following settings are only used for TTF fonts
		$min_size = 20;
		$max_size = 32;
		$min_angle = -30;	
		$max_angle = 30;	
--



Replace With:
--
		$img_width = 250;
		$img_height = 70;
		// The following settings are only used for TTF fonts
		$min_size = 30;
		$max_size = 35;
		$min_angle = -5;	
		$max_angle = 5;
--


Find:
--
		$to_draw = rand(0, 2);  	
--

Replace:
--
		$to_draw = rand(3, 3);  	
--


Find:
--
		imagerectangle($im, 0, 0, $img_width-1, $img_height-1, $border_color);
--

Replace:
--
		imagerectangle($im, 0, 0, $img_width+3, $img_height+3, $border_color);	
--


Find:
--
		$spacing = $img_width/ my_strlen($string);  
--

Replace:
--
		$spacing = 35;
--

===============
2. inc/function.php
===============


Find:
--
		$set = array("a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J","k","K","l","L","m","M","n","N","o","O","p","P","q","Q","r","R","s","S","t","T","u","U","v","V","w","W","x","X","y","Y","z","Z","1","2","3","4","5","6","7","8","9");
--


Replace With:
--
		$set = array("A","B","C","D","E","F","G","H","J","K","M","N","P","Q","R","S","T","U","V","W","X","Y","2","3","4","5","6","7","8","9");
--



Find:
--
		$str;
		for($i = 1; $i <= $length ; $i++)
--


Replace With:
--
		$str;
		for($i = 1; $i <= 7 ; $i++)
--
Can you provide a screenshot of what the new captcha looks like, so we can decide if we want to change this in our own forums? I know I don't use the current captcha, since it's so awful. Maybe if it was changed, I'd give it a chance again. Smile
3 attached for your reference,

Regards!
Wow, that's actually readable! LOL...maybe I will give it a try! Big Grin
I can bet you that the ability for an OCR application to crack that jumped about 200%
Pages: 1 2 3