DedeCMS密码重设工具radminpass

本工具是用于新人忘记管理员密码重设所制作,只需要将radminpass.php文件拷贝到根目录,运行“http://yousite/radminpass.php(yousite为网站域名)”,按照操作执行就可以。恢复完成后请及时删除这个文件!

1、针对GBK的文件

<?php

/**********************
DedeCMS 管理员帐号重设工具.
http://bbs.dedecms.com/
***********************/
//error_reporting(E_ALL || ~E_NOTICE);
require_once(dirname(__FILE__)."/include/common.inc.php");
if(empty($step))
{
    $step = 1;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>密码重设工具_GBK</title>
<style type="text/css">
<!--
body {
    font-family: "MS Serif", "New York", serif;
    font-size: 12px;
    color: #000;
}
table {
    border-top-width: 1px;
    border-right-width: 1px;
    border-left-width: 1px;
    border-top-style: dotted;
    border-right-style: dotted;
    border-left-style: dotted;
    border-top-color: #CCC;
    border-right-color: #CCC;
    border-left-color: #CCC;
}
td {
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: #CCC;
}
-->
</style>
</head>
<body>
<?php
if($step==1)
{
    $dsql->SetQuery("Select * From `#@__admin` where usertype=‘10‘");
    $dsql->Execute("ut");
?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td height="19" bgcolor="#E7E7E7"><table width="96%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td width="24%"><b><strong>第一步:选择管理员账号</strong></b></td>
        <td width="76%" align="right">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="215" align="center" valign="top" bgcolor="#FFFFFF"><form action="radminpass.php" method="post" name="form1" id="form1">
      <input type="hidden" name="step" value="2" />
      <table width="98%" border="0" cellspacing="1" cellpadding="1">
<tr>
          <td height="60" colspan="2" align="left">本工具是用于新人忘记管理员密码重设所制作,只需要将radminpass.php文件拷贝到根目录,运行&ldquo;http://yousite/radminpass.php(yousite为网站域名)&rdquo;,按照操作执行就可以。<font color="#FF0000">恢复完成后请及时删除这个文件!</font></td>
          </tr>
        <tr>
          <td width="16%" height="30" align="left">选择超级管理员ID:</td>
          <td width="84%" align="left">
            <select name=‘id‘ style=‘width:150px‘>
              <?php
                  while($myrow = $dsql->GetObject("ut"))
                  {
                      echo "<option value=‘".$myrow->id."‘>".$myrow->userid."</option>\r\n";
                  }
                  ?>
              </select>

            </td>
        </tr>
        <tr>
          <td height="60" align="left">&nbsp;</td>
          <td align="left"><input type="submit" name="Submit" value="下一步&gt;" class="coolbg np" /></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
<?php
}elseif($step==2){
    $row = $dsql->GetOne("Select * From `#@__admin` where id=‘$id‘");
?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td height="19" bgcolor="#E7E7E7"><table width="96%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td width="24%"><b><strong>第二步:修改管理员密码</strong></b></td>
        <td width="76%" align="right">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="215" align="center" valign="top" bgcolor="#FFFFFF"><form action="radminpass.php" method="post" name="form1" id="form1">
      <input name="step" type="hidden" id="step" value="3" />
      <input type="hidden" name="id" value="<?php echo $row[‘id‘]?>" />
      <table width="98%" border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td width="16%" height="30" align="left">用户登录ID:</td>
          <td width="84%" align="left"><?php echo $row[‘userid‘]?></td>
        </tr>
        <tr>
          <td height="30" align="left">用户笔名:</td>
          <td align="left"><input name="uname" type="text" id="uname" size="16" value="<?php echo $row[‘uname‘]?>" style="width:200px" />
            &nbsp;(发布文章后显示责任编辑的名字) </td>
        </tr>
        <tr>
          <td height="30" align="left">用户密码:</td>
          <td align="left"><input name="pwd" type="text" id="pwd" size="16" style="width:200px" />
            &nbsp;(留空则不修改,只能用‘[email protected]_-!‘以内范围的字符) </td>
        </tr>
        <tr>
          <td height="60" align="left">&nbsp;</td>
          <td align="left"><input type="submit" name="Submit" value="确定修改 " class="coolbg np" /></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
<?php
}elseif($step==3){
    $pwdm = ‘‘;
    if($pwd!=‘‘){
        $pwdm = ",pwd=‘".md5($pwd)."‘";
        $pwd = ",pwd=‘".substr(md5($pwd),5,20)."‘";
    }
    $query = "Update `#@__admin` set uname=‘$uname‘ $pwd where id=‘$id‘";
    $dsql->ExecuteNoneQuery($query);
    $query = "Update `#@__member` set uname=‘$uname‘ $pwdm where mid=‘$id‘";
    $dsql->ExecuteNoneQuery($query);
    ShowMsg("成功更改一个帐户!","radminpass.php");
}
?>
</body>
</html>

2、针对UTF-8的文件

<?php

/**********************
DedeCMS 管理员帐号重设工具.
http://bbs.dedecms.com/
***********************/
//error_reporting(E_ALL || ~E_NOTICE);
require_once(dirname(__FILE__)."/include/common.inc.php");
if(empty($step))
{
    $step = 1;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>密码重设工具_UTF-8</title>
<style type="text/css">
<!--
body {
    font-family: "MS Serif", "New York", serif;
    font-size: 12px;
    color: #000;
}
table {
    border-top-width: 1px;
    border-right-width: 1px;
    border-left-width: 1px;
    border-top-style: dotted;
    border-right-style: dotted;
    border-left-style: dotted;
    border-top-color: #CCC;
    border-right-color: #CCC;
    border-left-color: #CCC;
}
td {
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: #CCC;
}
-->
</style>
</head>
<body>
<?php
if($step==1)
{
    $dsql->SetQuery("Select * From `#@__admin` where usertype=‘10‘");
    $dsql->Execute("ut");
?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td height="19" bgcolor="#E7E7E7"><table width="96%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td width="24%"><b><strong>第一步:选择管理员账号</strong></b></td>
        <td width="76%" align="right">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="215" align="center" valign="top" bgcolor="#FFFFFF"><form action="radminpass.php" method="post" name="form1" id="form1">
      <input type="hidden" name="step" value="2" />
      <table width="98%" border="0" cellspacing="1" cellpadding="1">
<tr>
          <td height="60" colspan="2" align="left">本工具是用于新人忘记管理员密码重设所制作,只需要将radminpass.php文件拷贝到根目录,运行“http://yousite/radminpass.php(yousite为网站域名)”,按照操作执行就可以。<font color="#FF0000">恢复完成后请及时删除这个文件!</font></td>
          </tr>
        <tr>
          <td width="16%" height="30" align="left">选择超级管理员ID:</td>
          <td width="84%" align="left">
            <select name=‘id‘ style=‘width:150px‘>
              <?php
                  while($myrow = $dsql->GetObject("ut"))
                  {
                      echo "<option value=‘".$myrow->id."‘>".$myrow->userid."</option>\r\n";
                  }
                  ?>
              </select>

            </td>
        </tr>
        <tr>
          <td height="60" align="left">&nbsp;</td>
          <td align="left"><input type="submit" name="Submit" value="下一步&gt;" class="coolbg np" /></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
<?php
}elseif($step==2){
    $row = $dsql->GetOne("Select * From `#@__admin` where id=‘$id‘");
?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td height="19" bgcolor="#E7E7E7"><table width="96%" border="0" cellspacing="1" cellpadding="1">
      <tr>
        <td width="24%"><b><strong>第二步:修改管理员密码</strong></b></td>
        <td width="76%" align="right">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="215" align="center" valign="top" bgcolor="#FFFFFF"><form action="radminpass.php" method="post" name="form1" id="form1">
      <input name="step" type="hidden" id="step" value="3" />
      <input type="hidden" name="id" value="<?php echo $row[‘id‘]?>" />
      <table width="98%" border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td width="16%" height="30" align="left">用户登录ID:</td>
          <td width="84%" align="left"><?php echo $row[‘userid‘]?></td>
        </tr>
        <tr>
          <td height="30" align="left">用户笔名:</td>
          <td align="left"><input name="uname" type="text" id="uname" size="16" value="<?php echo $row[‘uname‘]?>" style="width:200px" />
            &nbsp;(发布文章后显示责任编辑的名字) </td>
        </tr>
        <tr>
          <td height="30" align="left">用户密码:</td>
          <td align="left"><input name="pwd" type="text" id="pwd" size="16" style="width:200px" />
            &nbsp;(留空则不修改,只能用‘[email protected]_-!‘以内范围的字符) </td>
        </tr>
        <tr>
          <td height="60" align="left">&nbsp;</td>
          <td align="left"><input type="submit" name="Submit" value="确定修改 " class="coolbg np" /></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
<?php
}elseif($step==3){
    $pwdm = ‘‘;
    if($pwd!=‘‘){
        $pwdm = ",pwd=‘".md5($pwd)."‘";
        $pwd = ",pwd=‘".substr(md5($pwd),5,20)."‘";
    }
    $query = "Update `#@__admin` set uname=‘$uname‘ $pwd where id=‘$id‘";
    $dsql->ExecuteNoneQuery($query);
    $query = "Update `#@__member` set uname=‘$uname‘ $pwdm where mid=‘$id‘";
    $dsql->ExecuteNoneQuery($query);
    ShowMsg("成功更改一个帐户!","radminpass.php");
}
?>
</body>
</html>
时间: 2024-08-28 20:41:28

DedeCMS密码重设工具radminpass的相关文章

创建Windows10 密码重设盘

如果你忘记Windows10的用户密码,则可以通过创建的密码重设盘重新创建一个新的密码.(只能为本地账户创建密码重置盘.) 1.打开"控制面板--用户账户和家庭安全--用户账户",选择"创建密码重置盘": 2.打开忘记密码向导并选择"下一步": 3.选择创建密码重置的磁盘(需要可移动媒体,如:USB闪存驱动器或软盘):选择"下一步": 4.输入当前的用户密码,如果没有,则不需要输入,然后选择"下一步": 5

Web服务器管理系列:9、创建密码重设盘

互联网时代需要记录的密码实在太多了,一不小心可能会忘记,假如服务器的密码忘记了将会是件很麻烦的事. Windows Server 2008 为我们提供了创建密码重设盘的功能: 点击创建密码重设盘: 点击下一步: 选择U盘然后点击下一步: 输入当前用户的密码然后点下一步: 密码重设盘创建成功,下面我们看看Windows Server 2008在我们的U盘上写入了什么: 下面我给大家演示下如何使用密码重设盘: 我们在登录的时候输错一次密码就会出现"重设密码"按钮: 我们点击"重设

EMS 动手实验2:用户自助密码重设&amp;条件访问策略强制用户使用MFA二次验证&amp;启用标识保护配置风险检测

前言: 本系列实验将引导用户完成O365 企业移动性和安全性(Enterprise Mobility Security)的常用操作和配置,本着实用性和安全性的原则,该系列实验会建议一些最佳实践.本系列实验主要分为以下几个阶段: 将Azure AD 登陆和审核日志发送到Azure Monitor 用户自助密码重设&条件访问策略强制用户使用MFA二次验证&启用标识保护配置风险检测 使用 Privileged Identity Management建立管理角色的审批和授权 使用Intune 管理

WordPress新用户注册时提示“您的密码重设链接无效”

在使用Wordpress密码找回功能及新用户注册邮件中的重置密码链接时,Wordpress提示“您的密码重设链接无效,请在下方请求新链接.”.“该key似乎无效”.“invalid key”. 这个其实不是wordpress的问题,邮箱收到邮件后,会将密码重置链接地址及其前后的“<>”一起当成链接地址生成超链接,点击此超链接后,由于传给wordpress的参数不对(多了个>),例如把鼠标移到下图的红色框的连接上,并看到浏览器左下角的URL提示连接,会发现多了一个“>”,所以word

Ubuntu忘记MySQL密码重设方法

====================忘了mysql密码,从网上找到的解决方案记录在这里==================== 结束当前正在运行的mysql进程 # /etc/init.d/mysql stop 用mysql安全模式运行并跳过权限验证 # mysqld_safe --user=mysql --skip-grant-tables --skip-networking & 用空密码方式使用root用户登录 MySQL #  mysql -u root mysql 更新密码 # up

MySQL方法总结--密码重设问题

root用户密码设置及忘记密码的解决方法 root用户密码不能为空,需要设置一个密码,看下面设置密码的三种方法: 方法1: 用SET PASSWORD命令  首先登录MySQL,使用mysql自带的那个客户端连接上mysql. 格式:mysql> set password for 用户名@localhost = password('新密码'); 例子:mysql> set password for [email protected] = password('123'); 方法2:用mysqla

Ubuntu下忘记MySQL密码重设方法

http://www.cnblogs.com/yuxc/archive/2012/07/25/2607587.html 1.结束当前正在运行的mysql进程.# /etc/init.d/mysql stop 2.用mysql安全模式运行并跳过权限验证.# /usr/bin/mysqld_safe --skip-grant-tables 3.重开一个终端以root身份登录mysql.# mysql -u root 4.修改root用户口令.mysql> use mysql;Reading tabl

网站开发之用户重设密码 找回密码功能的实现原理

网站开发之用户重设密码 找回密码功能的实现原理,这个东西基本在现在每个系统中都带有的功能,但是实现的方式也是挺多的,这个是跟数据库没多大关系的方法嘞. 用户流程: 1.用户忘记密码,来到密码重设界面 2.用户输入Email地址,点击重设密码按钮 3.用户收到一封密码重设邮件,里面有重设密码的链接,此链接有过期时间 4.用户点击链接,来到密码重设页面,输入新密码,完成 这个流程并没有什么创新,很多网站都是用这套流程 后端实现方式: 1.当用户输入Email地址后,验证这个Email,如果存在于数据

域控制器 忘记密码 如何重设管理员密码?

我学生的客户域控制器管理员密码给忘记了,需要他帮忙重设.使用windowsPE这种工具只能回复不是域控制器的计算机的密码. 下面给大家在虚拟机中演示如何重新设置域控制管理员密码. 进入BIOS,设置成从光驱启动. 进入命令提示符执行以下命令 ren osk.exe osk02.exe ren cmd.exe osk.exe 退出安装程序从硬盘重新引导 可以看到打开就是命令提示符,就可以直接更改管理员密码了就这么简单 充设了密码 别忘了了将以上重命名的文件改回来,否则就给别人留下了后门.