Ejemplo n.º 1
0
 if ($_POST['update'] == "now") {
     if ($_POST['act'] == "userinfo" && $_SESSION['UserGroup'] != $Settings['GuestGroup']) {
         $query = sql_pre_query("SELECT * FROM \"" . $Settings['sqltable'] . "members\" WHERE \"id\"=%i LIMIT 1", array($_SESSION['UserID']));
         $result = sql_query($query, $SQLStat);
         $num = sql_num_rows($result);
         $i = 0;
         $OldPassword = sql_result($result, $i, "UserPassword");
         $OldHashType = sql_result($result, $i, "HashType");
         $OldJoined = sql_result($result, $i, "Joined");
         $OldSalt = sql_result($result, $i, "Salt");
         $UpdateHash = false;
         if ($OldHashType == "ODFH") {
             $YourPassword = PassHash2x($_POST['OldPass']);
         }
         if ($OldHashType == "IPB2") {
             $YourPassword = hash2xkey($_POST['OldPass'], $OldSalt);
         }
         if ($OldHashType == "DF4H") {
             $YourPassword = b64e_hmac($_POST['OldPass'], $OldJoined, $OldSalt, "sha1");
         }
         if ($OldHashType == "iDBH2") {
             $YourPassword = b64e_hmac($_POST['OldPass'], $OldJoined, $OldSalt, "md2");
         }
         if ($OldHashType == "iDBH4") {
             $YourPassword = b64e_hmac($_POST['OldPass'], $OldJoined, $OldSalt, "md4");
         }
         if ($OldHashType == "iDBH5") {
             $YourPassword = b64e_hmac($_POST['OldPass'], $OldJoined, $OldSalt, "md5");
         }
         if ($OldHashType == "iDBH") {
             $YourPassword = b64e_hmac($_POST['OldPass'], $OldJoined, $OldSalt, "sha1");
Ejemplo n.º 2
0
     $UpdateHash = false;
 }
 if ($HashType == "GuestPass") {
     $YourPassword = null;
     $UpdateHash = false;
 }
 if ($HashType == "GuestPassword") {
     $YourPassword = null;
     $UpdateHash = false;
 }
 //iDB hashing system
 if ($HashType == "ODFH") {
     $YourPassword = PassHash2x($_POST['userpass']);
 }
 if ($HashType == "IPB2") {
     $YourPassword = hash2xkey($_POST['userpass'], $HashSalt);
 }
 if ($HashType == "DF4H") {
     $YourPassword = b64e_hmac($_POST['userpass'], $JoinedPass, $HashSalt, "sha1");
 }
 if ($HashType == "iDBH2") {
     $YourPassword = b64e_hmac($_POST['userpass'], $JoinedPass, $HashSalt, "md2");
 }
 if ($HashType == "iDBH4") {
     $YourPassword = b64e_hmac($_POST['userpass'], $JoinedPass, $HashSalt, "md4");
 }
 if ($HashType == "iDBH5") {
     $YourPassword = b64e_hmac($_POST['userpass'], $JoinedPass, $HashSalt, "md5");
 }
 if ($HashType == "iDBH") {
     $YourPassword = b64e_hmac($_POST['userpass'], $JoinedPass, $HashSalt, "sha1");