Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
  #11  
Old 14th May 2014, 08:26
ahemd ahemd is offline
Member
 
Join Date: May 2014
Posts: 1
Default
anyone can attach final fixed file?
Reply With Quote
  #12  
Old 20th June 2019, 23:05
Daz's Avatar
Daz Daz is offline
Senior Member
 
Join Date: Dec 2009
United Kingdom
Posts: 124
Default
The fix for the built in captcha is simple, replace your ./include/class_captcha.php with the one below. This should work in v5.6 as well. Must have been an error in decoding.


I haven't tested as I do not have a copy installed as of now so just let me know if you have an issue.


Kind Regards.


PHP Code:
<?php/* * ******************************************** *//*     TS Special Edition v.5.4.1 [Nulled]     *//*              Special Thanks To              *//*        DrNet - wWw.SpecialCoders.CoM        *//*          Vinson - wWw.Decode4u.CoM          *//*    MrDecoder - wWw.Fearless-Releases.CoM    *//*         Fynnon - wWw.BvList.CoM             *//* * ******************************************** */class tscaptcha {  function tscaptcha($width$height$characters) {    $font dirname(__FILE__) . '/captcha_fonts/monofont.ttf';    $code $this->generateCode($characters);    $font_size $height 0.75;    if (!$image = @imagecreate($width$height)) {      exit('Cannot initialize new GD image stream');    }    $background_color imagecolorallocate($image255255255);    $text_color imagecolorallocate($image2040100);    $noise_color imagecolorallocate($image100120180);    $i 0;    while ($i $width $height 3) {      imagefilledellipse($imagemt_rand(0$width), mt_rand(0$height), 11$noise_color);      ++$i;    }    $i 0;    while ($i $width $height 150) {      imageline($imagemt_rand(0$width), mt_rand(0$height), mt_rand(0$width), mt_rand(0$height), $noise_color);      ++$i;    }    if (!$textbox imagettfbbox($font_size0$font$code)) {      exit('Error in imagettfbbox function');    }    $x = ($width $textbox[4]) / 2;    $y = ($height $textbox[5]) / 2;    if (!imagettftext($image$font_size0$x$y$text_color$font$code)) {      exit('Error in imagettftext function');    }    header('Expires: Mon, 01 Jan 1990 00:00:00 GMT');    header('Last-Modified: ' gmdate('D, d M Y H:i:s') . ' GMT');    header('Cache-Control: no-store, no-cache, must-revalidate');    header('Cache-Control: post-check=0, pre-check=0'false);    header('Pragma: no-cache');    header('Content-Type: image/jpeg');    imagejpeg($image);    imagedestroy($image);    $_SESSION['security_code'] = $code;  }  function generatecode($characters) {    unset($_SESSION);    $possible 'abcdfghjkmnpqrstvwxyzABCDFGHJKMNPQRSTVWXYZ';    $code '';    $i 0;    while ($i $characters) {      $code .= substr($possiblemt_rand(0strlen($possible) - 1), 1);      ++$i;    }    return $code;  }}class tscaptcha2 extends tscaptcha {  function tscaptcha2($width$height$characters) {    $code $this->generateCode($characters);    if (!$im = @imagecreate($width$height)) {      exit('Cannot Initialize new GD image stream');    }    $background_color imagecolorallocate($im000);    $text_color imagecolorallocate($im2331491);    $font_size $height 0.75;    $bottom $height 2;    $center $width 2;    imagestring($im$font_size$center$bottom$code$text_color);    header('Expires: Mon, 01 Jan 1990 00:00:00 GMT');    header('Last-Modified: ' gmdate('D, d M Y H:i:s') . ' GMT');    header('Cache-Control: no-store, no-cache, must-revalidate');    header('Cache-Control: post-check=0, pre-check=0'false);    header('Pragma: no-cache');    header('Content-Type: image/png');    imagepng($im);    imagedestroy($im);  }}function gd_version() {  static $gd_version;  if ($gd_version) {    return $gd_version;  }  if (!extension_loaded('gd')) {    exit();  }  ob_start();  phpinfo(8);  $info ob_get_contents();  ob_end_clean();  $info stristr($info'gd version');  preg_match('/\\d/'$info$gd);  $gd_version $gd[0];  return $gd_version;}@error_reporting(E_ALL & ~E_NOTICE);@ini_set('error_reporting'E_ALL & ~E_NOTICE);@ini_set('display_errors''0');@ini_set('session.gc_maxlifetime''18000');@session_cache_expire(1440);@set_time_limit(0);@set_magic_quotes_runtime(0);@ini_set('magic_quotes_sybase'0);@session_name('TSSE_Session');@session_start();define('CTSC_VERSION''0.1 by');$width = (isset($_GET['width']) ? intval($_GET['width']) : '200');$height = (isset($_GET['height']) ? intval($_GET['height']) : '60');$characters rand(4,6); // fix the bug$gd_version = gd_version();if ((((function_exists('imagettftext') AND function_exists('imagettfbbox')) AND 2 <= gd_version()) AND ! isset($_GET['type']))) {  $captcha = new TsCaptcha($width, $height, $characters);  return 1;}$captcha = new TsCaptcha2($width, $height, $characters);?>
Bump: The updated fix attached below, I also aded a fix for another captcha (when certain funcs arent available).

Also fixed a silly bug where the captcha could be bypassed.

Unfortunately, the code tag didnt format the code properly in my last post, sorry about that.




Bump: The updated fix attached below, I also aded a fix for another captcha (when certain funcs arent available).

Also fixed a silly bug where the captcha could be bypassed.

Unfortunately, the code tag didnt format the code properly in my last post, sorry about that.




Bump: The updated fix attached below, I also aded a fix for another captcha (when certain funcs arent available).

Also fixed a silly bug where the captcha could be bypassed.

Unfortunately, the code tag didnt format the code properly in my last post, sorry about that.


Attached Files
File Type: php class_tscaptcha.php (4.7 KB, 2 views)
Reply With Quote
Reply

Tags
extra , fix , fixes , tsse

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra images upload saggy00 Template Shares 8 14th September 2009 21:42
[TS 3.1 bind] Fixes and few mods Ashur Template Shares 2 2nd April 2009 02:32
Extra security for your tracker sammygo Template Shares 0 4th November 2008 13:30
How to install extra themes in TS SE 5.0 discrob Template Shares 4 10th July 2008 21:43



All times are GMT +2. The time now is 11:33. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.