热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

phpmyadminmd5在导入数据库后解密问题-phpmyadminmd5decryptionissueafterimportingdatabase

Ihaveadatabaseonacpanelserver,whichcontainsauserfieldcalledpassword.WhenIlookat

I have a database on a cpanel server, which contains a user field called 'password'. When I look at the field through phpmyadmin, all the passwords appear as md5 encrypted.

我在cpanel服务器上有一个数据库,它包含一个名为“password”的用户字段。当我通过phpmyadmin查看字段时,所有的密码都显示为md5加密。

So for example, a password thats '12345' would be encrypted and appearing in the database as "e10adc3949ba59abbe56e057f20f883e". Now, on the original server, thats ok, because even if the password is encrypted in database, when I enter the password on the related website as '12345' it recognizes it and gives access.

例如,一个名为“12345”的密码将被加密,并以“e10adc3949ba59ba59abbe56e057f20f883e”的形式出现在数据库中。现在,在原来的服务器上,这没问题,因为即使密码是在数据库中加密的,当我在相关网站上输入“12345”密码时,它会识别密码并进行访问。

The problem is when I export and import the database. After importing the same database into another server, naturally the password values are still encrypted in the database. But, when I try logging in into the related website, the decrypted password, tht is, '12345' does not work anymore. I have to enter the password as "e10adc3949ba59abbe56e057f20f883e" and only then I can login. So I'm guessing the problem is that the data in the password column is not getting decrypted after importing to another database, hence when I enter '12345' instead of the extended md5 value, it does not match and gives me a wrong password error.

问题是当我导出和导入数据库时。在将相同的数据库导入到另一个服务器后,密码值自然仍然在数据库中进行加密。但是,当我尝试登录到相关的网站时,解密的密码tht是,“12345”不再工作了。我必须输入“e10adc3949ba59abbe56e057f20f883e”的密码,然后才能登录。我猜问题是,密码列中的数据在导入到另一个数据库后没有被解密,因此当我输入'12345'而不是扩展的md5值时,它不匹配,并给我一个错误的密码错误。

So can anyone help me solve this issue? I am supposed to migrate this website on another server, and its a school system, and currently none of my users have access because of this issue.

有人能帮我解决这个问题吗?我应该把这个网站迁移到另一个服务器上,它是一个学校系统,而现在我的用户都无法访问这个问题。

Thanks.

谢谢。

1 个解决方案

#1


2  

md5 is not encryption, it's a one-way hash. You cannot find the original value from a hash.

md5不是加密,而是单向散列。无法从散列中找到原始值。

On the second server, if the e10adc3949ba59abbe56e057f20f883e password works, the only reason I see, is that the application is not comparing the hash of the input value it received from the user, it's comparing the input value itself.

在第二个服务器上,如果e10adc3949ba59abbe56e057f20f883e密码工作,我看到的唯一原因是,应用程序没有比较从用户那里收到的输入值的哈希值,而是比较输入值本身。


推荐阅读
author-avatar
patrick0129_645
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有