logear with an encryption key md5 in php

1

I need to decipher to be able to log in, on the web save with an encryption md5

<?php include 'config2.php';

$json = file_get_contents('php://input');
$obj = json_decode($json,true);

    $email = $obj['email'];

    $password = md5($obj['password']);

    if($obj['email']!=""){

    $result= $db->query("SELECT * FROM estudiante where NombreUsuario='$email' and Clave='$password'");

        if($result->num_rows==0){
            echo json_encode('Wrong Details');
        }
        else{
        echo json_encode('ok');
        }
    }
    else{
      echo json_encode('try again');
    }

?>

I'm trying to enter and I get a password error, a

    
asked by Andres Pèrez 14.11.2018 в 20:58
source

1 answer

0

just in case you can modify a record in your database, maybe you could do something like hashear any word in a php file and then change that word hasheada into a record in your database.

Something like this:

 <?php
  $var = md5("cualquierPalabra");
  echo $var;
 ?>

you execute the php script and copy and modify it in one of your records in your database. Watch out just in case you have privileges to modify records in your database. Sometime I had to do it and I worked xD, a somewhat obsolete but good solution, at least in my case I worked.

    
answered by 14.11.2018 в 22:30