如何获得与 phpbb3 相同的密码哈希(md5())

发布于 2024-12-21 02:32:53 字数 381 浏览 3 评论 0原文

我的页面上有 phpbb3,现在我也开始做一些广告...所以基本上想要一个表格,在其中填写用户名和密码,然后我希望脚本对密码进行哈希和 md5(与我的 phpbb3 相同的方式)确实)并将密码和用户名与表forum_users进行比较......无论我做什么,我都无法使其起作用......

<?php

define('IN_PHPBB', true);
include ("../Forum/common.php");
include ("../Forum/includes/functions.php");


$pass = "password";
$hash = phpbb_hash($pass);

echo $hash;

?>

它实际上没有做任何事情

i have on my page phpbb3 and now I am also starting some advertisementing... So basicly want to have a form where i fill a username and password, then I want the script to hash and md5 the password (the same way as my phpbb3 does) and compare the password and username with table forum_users.... whatever I do I just cant make that works...

<?php

define('IN_PHPBB', true);
include ("../Forum/common.php");
include ("../Forum/includes/functions.php");


$pass = "password";
$hash = phpbb_hash($pass);

echo $hash;

?>

it doesnt do anything actually

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

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

发布评论

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

评论(2

哭了丶谁疼 2024-12-28 02:32:53

如果您的目标是根据数据库中的内容验证用户向您提供的用户名和密码,那么这就是您所需要的:

<?php
/**
*
* Login script for phpBB using username/password
* Used for website authentication
*
*/
define('IN_PHPBB', true);
$phpbb_root_path = dirname(__FILE__) . '/./';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include("common.php");
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

$username = request_var('username', '');
$password = request_var('password', '');

if(isset($username) && isset($password))
{
  $auth->login($username, $password, true);
}
?>

但是如果您仍然希望找出 PHPBB 密码加密哈希,它不再是 MD5在 3.0 或更高版本中,是一个自定义哈希。看一下这个帖子:

http://www.phpbb。 com/community/viewtopic.php?f=71&t=585387

我希望这会有所帮助。

皮特

If your goal is to authenticate the username and password that your user is providing to you against what is in the database then this is all you should need:

<?php
/**
*
* Login script for phpBB using username/password
* Used for website authentication
*
*/
define('IN_PHPBB', true);
$phpbb_root_path = dirname(__FILE__) . '/./';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include("common.php");
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

$username = request_var('username', '');
$password = request_var('password', '');

if(isset($username) && isset($password))
{
  $auth->login($username, $password, true);
}
?>

But if you still wish to figure out the PHPBB password encryption hash, it is no longer MD5 in version 3.0 or higher and is a custom hash. Take a look at this thread:

http://www.phpbb.com/community/viewtopic.php?f=71&t=585387

I hope this helps.

Pete

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