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 ionCube Encoder)
- *
- * @ Version : 4.1.0.0
- * @ Author : DeZender
- * @ Release on : 15.05.2020
- * @ Official site : http://DeZender.Net
- *
- */
- function cap()
- {
- if (extension_loaded('gd') && function_exists('gd_info')) {
- $image = @imagecreatetruecolor(240, 60);
- $background = imagecolorallocate($image, 255, 255, 255);
- imagefill($image, 0, 0, $background);
- $obf_DTsyNSkmIiI8Oz0KGw8GHTgjDxoINgE = imagecolorallocate($image, 204, 204, 204);
- $textcolor = imagecolorallocate($image, 51, 51, 51);
- for ($i = 0; $i < 6; $i++) {
- imagesetthickness($image, rand(1, 3));
- imageline($image, 0, rand(0, 60), 240, rand(0, 60), $obf_DTsyNSkmIiI8Oz0KGw8GHTgjDxoINgE);
- }
- $digit = '';
- for ($x = 15; $x <= 95; $x += 20) {
- $digit .= $num = rand(0, 9);
- imagechar($image, rand(5, 8), $x, rand(5, 20), $num, $textcolor);
- }
- $_SESSION['recovercapcha'] = $digit;
- imagepng($image, root . '/admin/uploads/cap.png');
- $obf_DS8UDRY8I1wlLzcEMFwZDwoXKQUEAgE = file_get_contents(root . '/admin/uploads/cap.png');
- return base64_encode($obf_DS8UDRY8I1wlLzcEMFwZDwoXKQUEAgE);
- }
- return false;
- }
- session_name('mkwsp6');
- session_start();
- session_regenerate_id(true);
- require_once 'ajax/db/MysqliDb.php';
- require_once 'ajax/db/funciones.php';
- if (!INSTALADO) {
- header('Location: /install/');
- exit();
- }
- if (!!INSTALADO && file_exists(root . '/install/index.php')) {
- exec('rm -r ' . root . '/install');
- }
- if (!!INSTALADO && file_exists(root . '/install/index.php')) {
- echo '<div style="border: 2px dashed;border-color: #d6203c;padding: 20px;margin: 20px;">' . "\n" . '<h4>ERROR</h4>' . "\n" . 'Elimine la carpeta <b>"install"</b> para poder continuar<br>' . "\n" . 'Puede eliminarlo vía consola ejecuntando el comando: <b>rm -r ' . root . '/install</b>' . "\n" . '</div>';
- exit();
- }
- if (isset($_POST['cap']) && isset($_POST['mail'])) {
- if ($_SESSION['recovercapcha'] !== $_POST['cap']) {
- $salida = ['estado' => 'error', 'salida' => 'Código capcha incorrecto.', 'img' => cap()];
- header('Content-Type: application/json');
- echo json_encode($salida, JSON_UNESCAPED_UNICODE);
- $db->disconnect();
- exit();
- }
- $db->where('estado', 1);
- $db->where('correo', nohtml($_POST['mail']));
- $us = $db->getOne('login');
- if (empty($us['id'])) {
- $salida = ['estado' => 'error', 'salida' => 'No existe ningún operador con este correo.', 'img' => cap()];
- header('Content-Type: application/json');
- echo json_encode($salida, JSON_UNESCAPED_UNICODE);
- $db->disconnect();
- exit();
- }
- $code = token('encode', $us['id'] . time());
- $db->where('id', $us['id']);
- $db->update('login', ['recover' => $code]);
- obf_DQszCRwBLBcSChM3Fj4hXAUbBwQCASI((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] === 'on') ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/admin/ajax/resetpwd?t=a&token=' . $code, $us['id']);
- $log = 'Solicitud para recuperar contraseña de acceso al portal - Login ID: ' . $us['id'];
- addlog($log, 0, 0);
- $salida = ['estado' => 'exito', 'salida' => 'Se ha enviado un link a su correo, revise el correo para restablecer su contraseña.', 'img' => cap()];
- header('Content-Type: application/json');
- .............................................................................................
- ........................................................
- ......................
Add Comment
Please, Sign In to add comment