Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1.  
  2.     @$fp = fopen("../unikey.txt", "r");     // unikey 5ec543315158e5ba91155e851236a078
  3.     if ($fp)
  4.     {
  5.         $unikey = fread($fp, 32); //apre file legge
  6.         //print $unikey;
  7.         //print md5($password);  //md5() algoritmo di hashing
  8.         if (md5($unikey . $seme) == $password)     //strcmp
  9.         {
  10.             $accessouniversale = true;
  11.             $_SESSION['accessouniversale'] = true;
  12.  
  13.         }
  14.     }
  15.  
  16.  
  17.     //Esecuzione query
  18.     $username = stringa_html('utente');   //boh
  19.     $password = stringa_html('password');
  20.     if ($password != md5(md5($chiaveuniversale) . $seme) & (!$accessouniversale))     //se pass != unikey && !(bool == false)
  21.     {
  22.         $sql = "SELECT *,unix_timestamp(ultimamodifica) AS ultmod FROM tbl_utenti WHERE userid='" . $username . "' AND  md5(concat(password,'$seme'))='" . elimina_apici($password) . "'";    //generic sql query
  23.     }
  24.     else
  25.     {
  26.         $sql = "SELECT *,unix_timestamp(ultimamodifica) AS ultmod FROM tbl_utenti WHERE userid='" . $username . "'";
  27.     }
  28.  
  29.  $result = mysqli_query($con, inspref($sql)) or die ("Errore nella query: " . mysqli_error($con) . inspref($sql));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement