Skip to content

Instantly share code, notes, and snippets.

@lidio601
Last active August 29, 2015 14:02
Show Gist options
  • Save lidio601/2eab2c31576a48a38367 to your computer and use it in GitHub Desktop.
Save lidio601/2eab2c31576a48a38367 to your computer and use it in GitHub Desktop.
Reset Joomla 1.0 user password by updating the database user record
<?php
//metti la tua password qui
$adminPassword = 'MY-VERY-NEW-PASSWORD';
function mosMakePassword($length) {
$salt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$len = strlen($salt);
$makepass="";
mt_srand(10000000*(double)microtime());
for ($i = 0; $i < $length; $i++)
$makepass .= $salt[mt_rand(0,$len - 1)];
return $makepass;
}
$salt = mosMakePassword(16);
$crypt = md5($adminPassword.$salt);
$cryptpass = $crypt.':'.$salt;
//leggi la tua password criptata qui
die($cryptpass);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment