Flash 博客上的 PHP 密码问题

发布于 2024-09-07 03:31:15 字数 546 浏览 2 评论 0原文

我最近在 Flashcomponents.net 上购买了一个 Flash 博客: http://www.flashcomponents.net/component /advanced_xml_flash_blog_with_cms_and_ rating_system.html 有博客和博客“编辑器”,您必须登录。密码在名为“admin.php”的 Php 文件中定义。 问题是,无论我输入什么密码,我都无法登录。

这是“admin.php”的代码:

<?php

$password = "admin";

if($_POST['un'] == $password){
    print "t";
}else{
    print "Access denied";
}

?>

任何人都可以帮忙吗?

I recently purchased a flash blog on Flashcomponents.net : http://www.flashcomponents.net/component/advanced_xml_flash_blog_with_cms_and_rating_system.html
There is the blog and the blog "editor", for wich you have to log in. The password is defined in a Php file named 'admin.php'.
The problem is that, whatever password I type, I never managed to log in..

Here is the code of 'admin.php' :

<?php

$password = "admin";

if($_POST['un'] == $password){
    print "t";
}else{
    print "Access denied";
}

?>

Can anyone help ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我为君王 2024-09-14 03:31:15

您也不应该这样存储密码。至少,通过 MD5 运行它:

$password = "yourmd5edpasshere";

if(md5($_POST['un']) == $password){
    print "t";
}else{
    die('Access denied');
}

但是,由于该变量名为“un”,并且是“admin”,我倾向于认为它是用户名而不是密码。

如果这表明了程序其余部分的质量(对于“闪存博客”,我不会感到惊讶)那么你的钱就被浪费了

You should also not store the password like that. At the very least, run it through MD5:

$password = "yourmd5edpasshere";

if(md5($_POST['un']) == $password){
    print "t";
}else{
    die('Access denied');
}

However, due to the fact that the variable is called 'un', and is "admin", I'd be inclined to think that it was a username and not a password.

If this is indicative of the quality of the rest of the program, (and for a "flash blog" I wouldn't be surprised) then your money was wasted

窗影残 2024-09-14 03:31:15

if 行之前添加:print_r($_POST); 以确保您认为正在发布的数据已被发布。

Add before the if line: print_r($_POST); to make sure the data you think is being posted is being posted.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文