Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- class SimpleCaptcha
- {
- public $difficulty = 0.5;
- public $width = 150;
- public $height = 61;
- public $wordsFile = '';
- public $resourcesPath = 'resources';
- public $minWordLength = 5;
- public $maxWordLength = 6;
- public $session_var = 'dig_captcha';
- public $backgroundColor = [255, 255, 255];
- public $colors = [
- [27, 78, 181],
- [22, 163, 35],
- [122, 127, 186]
- ];
- public $shadowColor;
- public $lineWidth = 2;
- public $fonts = [
- 'Antykwa' => ['spacing' => -3, 'minSize' => 27, 'maxSize' => 30, 'font' => 'Shabnam-Bold-FD.ttf']
- ];
- public $Yperiod = 12;
- public $Yamplitude = 14;
- public $Xperiod = 11;
- public $Xamplitude = 5;
- public $maxRotation = 1;
- public $scale = 3;
- public $blur = false;
- public $debug = false;
- public $imageFormat = 'png';
- public $im;
- public function __construct($config = [])
- {
- }
- public function CreateImage()
- {
- $ini = microtime(true);
- if (2 < $this->difficulty) {
- $this->difficulty = 2;
- }
- if ($this->difficulty <= 0) {
- $this->difficulty = 0.1;
- }
- $this->ImageAllocate();
- $text = $this->GetCaptchaText();
- $fontcfg = $this->fonts[array_rand($this->fonts)];
- $this->WriteText($text, $fontcfg);
- $ses = filter_var($_GET['r'], FILTER_SANITIZE_NUMBER_FLOAT);
- if (isset($_GET['pr'])) {
- $prev_ses = filter_var($_GET['pr'], FILTER_SANITIZE_NUMBER_FLOAT);
- if (isset($_SESSION[$this->session_var . $prev_ses])) {
- unset($_SESSION[$this->session_var . $prev_ses]);
- }
- }
- $_SESSION[$this->session_var . $ses] = $text;
- if (!empty($this->lineWidth)) {
- $this->WriteLine();
- }
- if ($this->blur && function_exists('imagefilter')) {
- .............................................................
- .........................................
- ..................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement