Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php $_F=__FILE__;$_X='P2lCP1ouWg1WDVZIZVlNblplMk0+RlpaXHVPOU1XbjsNVg1WUW5NPm00NzsNVlFuTT..

Decoded Output download

?><?php

namespace App\Models;

use PDO;
use \Core\View;
use \Core\Classes\Flash;
use \Core\Classes\Token;
use \Core\Classes\Chiamate;
/**
 * Example user model
 *
 * PHP version 7.0
 */
class User extends \Core\Model
{


	public $ritorno = [];

	function __construct($data = []){
		$licenze = array_diff( scandir("./licenza"), array(".", "..") );
		$rimuovi = './licenza/.DS_Store';
		if(ile_exists($rimuovi)){
			unlink($rimuovi);
		}
		if(isset($licenze[2])){
			$dettagli['key'] = str_replace('.xml', '', $licenze[2]);
			$dettagli['host'] = \App\Config::LINK_HOST;
			$mando = url_codifica(\json_encode($dettagli));
			$url = "http://licenze.marcodattisi.com/core/licence.php?check=".$mando;
			$risultato = \json_decode(ile_get_contents($url), true);
			if($risultato['risultato'] != 'ok'){
				Flash::AggMex('Attenzione Questo software non ha la licenza', Flash::WARNING, 'No Licenza');
				exit(header('Location: /login', true, 303));
			}else{
				$_SESSION['licenza'] = $licenze[2];
			}
		}else{
			Flash::AggMex('Attenzione Questo software non ha la licenza', Flash::WARNING, 'No Licenza');
		}
		foreach ($data as $key => $value) {
			$this->$key = $value;
		}
	}
    /**
     * Get all the users as an associative array
     *
     * @return array
     */
    public function loginUser(){

			$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
			//echo password_hash($this->password, password_DEFAULT).'<br />';
			$this->ritorno['dati']['email'] = $this->email;

			$this->ritorno['dati']['password'] = $this->password;

			if($this->validate()){

				$ctrl = $this->loginCntrol();

				$ctrlPassw = $this->CheckPassword($ctrl->passwordUtente);

			}else{

				$ctrlPassw = $this->CheckPassword("");

				$ctrl = false;

			}


			if($ctrlPassw){

				\session_regenerate_id(true);

				foreach ($ctrl as $key => $value) {
					// code...
					if(!is_array($key) && !is_array($value)){

						if($key == 'idUtenteAutoIncrement'){

							$token = $this->ricordaLogin($ctrl->$key);

							if($token){

								setcookie('logedIn', $token, time() + 60 * 60 * 24 * 30);

							}

						}

						$_SESSION[$key] = $ctrl->$key;

					}

				}

				Flash::AggMex('Login avvenuto con successo', Flash::SUCCESS);

				header('Location: '.$actual_link, true, 303);

			}else{

				View::renderTemplate('Login/login.html', $this->ritorno);

			}

		}
		function validate(){

			if (filter_var($this->email, FILTER_VALIDATE_EMAIL)) {

				  return true;

				} else {

					Flash::AggMex('Immettere una email valida', Flash::INFO);

				  return false;

				}

		}

		function CheckPassword($psw){

			if(password_verify($this->password, $psw)){

				return true;

			}else{

				Flash::AggMex('Password Errata');

				return false;
				//header('Location: /login', true, 303)
			}
		}


		function loginCntrol(){

			$sql = 'SELECT * FROM tbl_utenti INNER JOIN ap_permessi ON tbl_utenti.permessiUtente = ap_permessi.idPermessoAutoIncrement WHERE emailUtente = :email';

			$db = static::getDB();

			$stmt = $db->prepare($sql);

			$stmt->bindValue(':email', $this->email, PDO::PARAM_STR);

			$stmt->setFetchMode(PDO::FETCH_CLASS, \get_called_class());

			$stmt->execute();

			return $stmt->fetch();

		}

		function controlloUpdate($email, $id)
		{
			$sql = "SELECT * FROM tbl_utenti WHERE emailUtente = :emailUtente AND idUtenteAutoIncrement != :id";

			$db = static::getDB();

			$stmt = $db->prepare($sql);

			$stmt->bindValue(':emailUtente', $email, PDO::PARAM_STR);
			$stmt->bindValue(':id', $id, PDO::PARAM_INT);

			$stmt->setFetchMode(PDO::FETCH_CLASS, \get_called_class());

			$stmt->execute();

			return $stmt->fetch();
		}

		public function ricordaLogin($idLogin){
			$token = new Token();


			$scadenza = time() + 60 * 60 * 24 * 30; // equivalente di un mese
			$c = new Chiamate();
			$token = $token->getHash();

			$campiValori = [
				'token_hash' => $token,
				'utenteIdAutoIncrement' => $idLogin,
				'scadenza_at' => date('Y-m-d H:i:s', $scadenza)
			];

			//$ritorno = $c->salva('ap_ricordaLogin', $campiValori);
			if($token){
				return $token;
			}else{
				return false;
			}
		}
}

Did this file decode correctly?

Original Code

<?php $_F=__FILE__;$_X='P2lCP1ouWg1WDVZIZVlNblplMk0+RlpaXHVPOU1XbjsNVg1WUW5NPm00NzsNVlFuTT5cL096TVw2c019Ow1WUW5NPlwvT3pNXC9XZW5uTW5ccldlbi47DVZRbk0+XC9Pek1cL1dlbm5NblxUT3lNSDsNVlFuTT5cL096TVwvV2Vubk1uXC8uc2VZZT1NOw1WaCoqDVY+Kj5LUmVZWldNPlFuTXo+WU85TVcNVj4qDVY+Kj5tdG0+Y016bnNPSD4xWGENVj4qaA1WMldlbm4+IG5Nej5NUj1NSDluPlwvT3pNXHVPOU1XDVZdDVYNVg1WCVpRPFdzMj4kenM9T3pITz5TPmpkOw1WDVYJQVFIMj1zT0g+X18yT0huPXpRMj0oJDllPWU+Uz5qZCldDVYJCSRXczJNSDVNPlM+ZXp6ZXFfOXNBQSg+bjJlSDlzeigiWGhXczJNSDVlIiksPmV6emVxKCJYIiw+IlhYIik+KTsNVgkJJHpzWVFPY3M+Uz4nWGhXczJNSDVlaFg0cF9wPU96TSc7DVYJCXNBKFxBc1dNX01Sc249bigkenNZUU9jcykpXQ1WCQkJUUhXc0h5KCR6c1lRT2NzKTsNVgkJbA1WCQlzQShzbm5NPSgkV3MyTUg1TWprZCkpXQ1WCQkJJDlNPT1leFdzaid5TXEnZD5TPm49el96TVpXZTJNKCdYUllXJyw+JycsPiRXczJNSDVNamtkKTsNVgkJCSQ5TT09ZXhXc2onLk9uPSdkPlM+XEZaWlwvT0hBc3g6OkkzRUdfdDdwVDsNVgkJCSRZZUg5Tz5TPlF6V18yTzlzQXMyZShcCm5PSF9NSDJPOU0oJDlNPT1leFdzKSk7DVYJCQkkUXpXPlM+Ii49PVo6aGhXczJNSDVNWFllejJPOWU9PXNuc1gyT1loMk96TWhXczJNSDJNWFouWj8yLk0yeVMiWCRZZ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 1
base64_decode 2

Variables

$_D base64_decode
$_F index.php
$_R 0
$_X 0

Stats

MD5 9e4b5d3767645aecdd3d4ea0ad1a568f
Eval Count 2
Decode Time 102 ms