Guest User

Untitled

a guest
Oct 20th, 2021
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class SimpleCaptcha
  15. {
  16. public $difficulty = 0.5;
  17. public $width = 150;
  18. public $height = 61;
  19. public $wordsFile = '';
  20. public $resourcesPath = 'resources';
  21. public $minWordLength = 5;
  22. public $maxWordLength = 6;
  23. public $session_var = 'dig_captcha';
  24. public $backgroundColor = [255, 255, 255];
  25. public $colors = [
  26. [27, 78, 181],
  27. [22, 163, 35],
  28. [122, 127, 186]
  29. ];
  30. public $shadowColor;
  31. public $lineWidth = 2;
  32. public $fonts = [
  33. 'Antykwa' => ['spacing' => -3, 'minSize' => 27, 'maxSize' => 30, 'font' => 'Shabnam-Bold-FD.ttf']
  34. ];
  35. public $Yperiod = 12;
  36. public $Yamplitude = 14;
  37. public $Xperiod = 11;
  38. public $Xamplitude = 5;
  39. public $maxRotation = 1;
  40. public $scale = 3;
  41. public $blur = false;
  42. public $debug = false;
  43. public $imageFormat = 'png';
  44. public $im;
  45.  
  46. public function __construct($config = [])
  47. {
  48. }
  49.  
  50. public function CreateImage()
  51. {
  52. $ini = microtime(true);
  53.  
  54. if (2 < $this->difficulty) {
  55. $this->difficulty = 2;
  56. }
  57.  
  58. if ($this->difficulty <= 0) {
  59. $this->difficulty = 0.1;
  60. }
  61.  
  62. $this->ImageAllocate();
  63. $text = $this->GetCaptchaText();
  64. $fontcfg = $this->fonts[array_rand($this->fonts)];
  65. $this->WriteText($text, $fontcfg);
  66. $ses = filter_var($_GET['r'], FILTER_SANITIZE_NUMBER_FLOAT);
  67.  
  68. if (isset($_GET['pr'])) {
  69. $prev_ses = filter_var($_GET['pr'], FILTER_SANITIZE_NUMBER_FLOAT);
  70.  
  71. if (isset($_SESSION[$this->session_var . $prev_ses])) {
  72. unset($_SESSION[$this->session_var . $prev_ses]);
  73. }
  74. }
  75.  
  76. $_SESSION[$this->session_var . $ses] = $text;
  77.  
  78. if (!empty($this->lineWidth)) {
  79. $this->WriteLine();
  80. }
  81. if ($this->blur && function_exists('imagefilter')) {
  82. .............................................................
  83. .........................................
  84. ..................
RAW Paste Data