php pdo 绕过,php-带PDO的忘记密码脚本(需要解密)
我可能有一個(gè)愚蠢的愚蠢的問題……我正在做一個(gè)被遺忘的密碼腳本(當(dāng)然是登錄系統(tǒng)),但是我被卡住了.我創(chuàng)建了一個(gè)具有特殊ID的代碼(有效,是的!),但是我無法對(duì)其進(jìn)行解密…您能幫我嗎?
這是我創(chuàng)建特殊ID的功能:
Recovery_Script.php
include "pdo.php"; if(isset($_POST["submit"]) AND isset($_POST["ForgotPassword"])) {
$email = $_POST["ForgotPassword"];
// Check to see if a user exists with this e-mail
$sql = "SELECT email FROM account WHERE email=:email";
$stmt = $db->prepare($sql);
$stmt->execute(array(":email"=>$email));
$items = $stmt->fetchAll();
$db = null;
foreach($items as $data){
if($data["email"] == $email){
// Create a unique salt. This will never leave PHP unencrypted.
$salt = "498#2D83B631%3800EBD!801600D*7E3CC13";
// Create the unique user password reset key
$password = hash('sha256', $salt.$email);
// Create a url which we will direct them to reset their password
$pwrurl = "http://student.sps-prosek.cz/~kocvaja14/Project/SelfMade/templates/script/recovery_password.php?q=".$password;
// Mail them their key
$mailbody = "Dobry den,\n\nJestli tento email nepat?í vám, prosím, ignorujte jej. Byla vytvo?ena ?ádost o obnovení hesla na webové stránce http://student.sps-prosek.cz/~kocvaja14/SelfMade/\n\nPro obnovení hesla klikněte na odkaz ní?e. \n\nThanks,\nThe Administration";
mail($email, "http://student.sps-prosek.cz/~kocvaja14/Project/SelfMade/index.php - Password Reset", $mailbody);
echo "Your password recovery key has been sent to your e-mail address.";
} else
echo "No user with that e-mail address exists.";
} }?>
現(xiàn)在我需要?jiǎng)?chuàng)建文件,在該文件中我將解密此ID($password).但是我做不到(因?yàn)槲覍?duì)此東西知識(shí)不足).你能幫我嗎?謝謝 !
總結(jié)
以上是生活随笔為你收集整理的php pdo 绕过,php-带PDO的忘记密码脚本(需要解密)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在计算机管理中创建不同的用户,为什么在计
- 下一篇: php rar_PHP: rar://