Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @$fp = fopen("../unikey.txt", "r"); // unikey 5ec543315158e5ba91155e851236a078
- if ($fp)
- {
- $unikey = fread($fp, 32); //apre file legge
- //print $unikey;
- //print md5($password); //md5() algoritmo di hashing
- if (md5($unikey . $seme) == $password) //strcmp
- {
- $accessouniversale = true;
- $_SESSION['accessouniversale'] = true;
- }
- }
- //Esecuzione query
- $username = stringa_html('utente'); //boh
- $password = stringa_html('password');
- if ($password != md5(md5($chiaveuniversale) . $seme) & (!$accessouniversale)) //se pass != unikey && !(bool == false)
- {
- $sql = "SELECT *,unix_timestamp(ultimamodifica) AS ultmod FROM tbl_utenti WHERE userid='" . $username . "' AND md5(concat(password,'$seme'))='" . elimina_apici($password) . "'"; //generic sql query
- }
- else
- {
- $sql = "SELECT *,unix_timestamp(ultimamodifica) AS ultmod FROM tbl_utenti WHERE userid='" . $username . "'";
- }
- $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