试过好多遍了,都快疯了,不过慢慢还是有些进展的
现在问题卡在一个地方了,因为我转换过来的时候只能读到1位密码进行加密,所以我把用来覆盖的两个USER.PHP中- elseif($user['password'] != md5($passwordmd5.$user['salt']) && $user['password'] != md5(substr(md5($password),8,16).$user['salt']))
复制代码 和- if($user['password'] == md5(substr(md5($password),8,16).$user['salt']))
复制代码 都改为了- elseif($user['password'] != md5($passwordmd5.$user['salt']) && $user['password'] != md5(substr(md5($password),8,1).$user['salt']))
复制代码 和- if($user['password'] == md5(substr(md5($password),8,1).$user['salt']))
复制代码 ,但登陆还是失败。
我自己写了个显示编码结果的小程序
- <?php
- $ucfounderpw = '密码';//密码处填入要输入的密码
- $ucsalt = 'ucsalt';//ucsalt处改为数据库中对应用户的ucsalt
- $ucfounderpw = md5(substr(md5($ucfounderpw),8,1).$ucsalt);
- echo $ucfounderpw.'<br />'.$ucsalt;
- ?>
复制代码
得出的结果跟数据库中存的密码是一样的,但是登陆依然失败,彻底崩溃了 |