Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../var/softacul.../admidio
File: update_pass.php
<?php
[0] Fix | Delete
[1] Fix | Delete
@unlink('update_pass.php');
[2] Fix | Delete
[3] Fix | Delete
$options = array('cost' => 10);
[4] Fix | Delete
$gPasswordHashAlgorithm = 'DEFAULT';
[5] Fix | Delete
[6] Fix | Delete
define('HASH_ALGORITHM_DEFAULT','DEFAULT');
[7] Fix | Delete
define('HASH_ALGORITHM_ARGON2ID','ARGON2ID');
[8] Fix | Delete
define('HASH_ALGORITHM_ARGON2I','ARGON2I');
[9] Fix | Delete
define('HASH_ALGORITHM_BCRYPT','BCRYPT');
[10] Fix | Delete
define('HASH_ALGORITHM_SHA512','SHA512');
[11] Fix | Delete
define('HASH_INDICATOR_SHA512','$6$');
[12] Fix | Delete
define('HASH_COST_SHA512_DEFAULT',100000);
[13] Fix | Delete
define('HASH_COST_SHA512_MIN',25000);
[14] Fix | Delete
define('HASH_COST_BCRYPT_DEFAULT',PASSWORD_BCRYPT_DEFAULT_COST);
[15] Fix | Delete
define('HASH_COST_BCRYPT_MIN',8);
[16] Fix | Delete
[17] Fix | Delete
function __hash($password, $algorithm = HASH_ALGORITHM_DEFAULT, array $options = array())
[18] Fix | Delete
{
[19] Fix | Delete
$options = __getPreparedOptions($algorithm, $options);
[20] Fix | Delete
[21] Fix | Delete
switch ($algorithm) {
[22] Fix | Delete
case HASH_ALGORITHM_DEFAULT:
[23] Fix | Delete
$algorithmPhpConstant = PASSWORD_DEFAULT;
[24] Fix | Delete
break;
[25] Fix | Delete
case HASH_ALGORITHM_ARGON2ID:
[26] Fix | Delete
$algorithmPhpConstant = PASSWORD_ARGON2ID;
[27] Fix | Delete
break;
[28] Fix | Delete
case HASH_ALGORITHM_ARGON2I:
[29] Fix | Delete
$algorithmPhpConstant = PASSWORD_ARGON2I;
[30] Fix | Delete
break;
[31] Fix | Delete
case HASH_ALGORITHM_BCRYPT:
[32] Fix | Delete
$algorithmPhpConstant = PASSWORD_BCRYPT;
[33] Fix | Delete
break;
[34] Fix | Delete
case HASH_ALGORITHM_DEFAULT:
[35] Fix | Delete
$algorithmPhpConstant = PASSWORD_DEFAULT;
[36] Fix | Delete
break;
[37] Fix | Delete
case HASH_ALGORITHM_SHA512:
[38] Fix | Delete
$salt = '[[salt]]';
[39] Fix | Delete
return crypt($password, HASH_INDICATOR_SHA512 . 'rounds=' . $options['cost'] . '$' . $salt . '$');
[40] Fix | Delete
default:
[41] Fix | Delete
$algorithmPhpConstant = PASSWORD_DEFAULT;
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
return password_hash($password, $algorithmPhpConstant, $options);
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
function __getPreparedOptions($algorithm, array $options)
[48] Fix | Delete
{
[49] Fix | Delete
if ($algorithm === HASH_ALGORITHM_SHA512) {
[50] Fix | Delete
$defaultCost = HASH_COST_SHA512_DEFAULT;
[51] Fix | Delete
$minCost = HASH_COST_SHA512_MIN;
[52] Fix | Delete
} elseif ($algorithm === HASH_ALGORITHM_BCRYPT || ($algorithm === HASH_ALGORITHM_DEFAULT && PASSWORD_DEFAULT === PASSWORD_BCRYPT)) {
[53] Fix | Delete
$defaultCost = HASH_COST_BCRYPT_DEFAULT;
[54] Fix | Delete
$minCost = HASH_COST_BCRYPT_MIN;
[55] Fix | Delete
} else {
[56] Fix | Delete
$options['cost'] = null;
[57] Fix | Delete
return $options;
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
$options = array('cost' => 10);
[61] Fix | Delete
return $options;
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
$resp = __hash('[[admin_pass]]', $gPasswordHashAlgorithm, $options);
[65] Fix | Delete
echo '<update_pass>'.$resp.'</update_pass>';
[66] Fix | Delete
[67] Fix | Delete
?>
[68] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function