PHP找回密码工具:快速破解自己的密码

用于已知MD5密文值(比如宝塔旧版sqlite数据库里的密码),提交自己可能的几十个密码用于一次性判断是什么密码,规避验证码影响枚举效率/密码尝试次数限制/忘记刚才填写什么正确密码而重复提交密码/登陆成功了却忘记刚才成功的密码等情况。

<?php
if ($_GET["a"] == "do") {
$passwords = explode("\n", $_POST['passwords']);
$md5Value = $_POST['md5Value'];
$result = '';
foreach ($passwords as $password) {
$password = trim($password);
if (!empty($password)) {
$isMatch = md5($password) === $md5Value; //可以自定义加密规则比如md5(md5(
$result .= "密码: $password - " . ($isMatch ? "匹配" : "不匹配") . "<br>";
}
}
echo $result; exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>自用:自己密码快速 MD5 验证工具</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
}
label {
display: block;
margin-bottom: 5px;
}
textarea,
input[type="text"] {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
padding: 10px 20px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
#result {
margin-top: 20px;
}
</style>
</head>
<body>
<h1>密码 MD5 验证</h1>
<form id="passwordForm">
<label for="passwords">输入密码(每行一个):</label>
<textarea id="passwords" name="passwords" rows="5">
123456
</textarea>
<label for="md5Value">输入 MD5 值:</label>
<input type="text" id="md5Value" name="md5Value" value="">
<button type="submit">提交验证</button>
</form>
<div id="result"></div>
<script>
document.getElementById('passwordForm').addEventListener('submit', function (e) {
e.preventDefault();
const passwords = document.getElementById('passwords').value.split('\n');
const md5Value = document.getElementById('md5Value').value;
const xhr = new XMLHttpRequest();
xhr.open('POST', '?a=do', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
const data = `passwords=${encodeURIComponent(passwords.join('\n'))}&md5Value=${encodeURIComponent(md5Value)}`;
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
document.getElementById('result').innerHTML = xhr.responseText;
}
};
xhr.send(data);
});
</script>
</body>
</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

YUJIANYUE

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值