Advertisement
Guest User

Untitled

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