PHP PHPBBForumlarındaKullanıcılarıŞifresiniTopluHa
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP PHPBBForumlarındaKullanıcılarıŞifresiniTopluHa相关的知识,希望对你有一定的参考价值。
<?
function md5pass($totalChar,&$password,&$clean)
{
// *******************************
// Random Password Generator-Start
// *******************************
//$totalChar = 8; // number of chars in the password
$salt = "abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789"; // salt to select chars from
srand((double)microtime()*1000000); // start the random generator
$password=""; // set the inital variable
for ($i=0;$i<$totalChar;$i++) // loop and create password
$password = $password . substr ($salt, rand() % strlen($salt), 1);
$clean = $password;
$password = md5($password);
// *****************************
// Random Password Generator-End
// *****************************
}
mysql_connect("localhost","user","password") or die("mysql e bağlanamadık");
mysql_select_db("phpbb") or die("veritabanını seçilemedi");
mysql_query('CREATE TABLE IF NOT EXISTS `yedek` ( `user_id` MEDIUMINT( 8 ) NOT NULL , `user_password` VARCHAR( 32 ) NOT NULL , `user_newpassword` VARCHAR( 32 ) NOT NULL , UNIQUE ( `user_id` ) ) CHARACTER SET = utf8;'); //yedek tablosu - user id - eski sifre - yeni sifreyi icerecek
$sql = mysql_query('SELECT `user_id` , `user_password` , `username` FROM `phpbb_users`');
$id = mysql_num_rows($sql);
echo "<table border=1><tr><td><b>User ID</b></td><td><b>Kullanıcı Adı</b></td><td><b>Eski Sifre(MD5)</b></td><td><b>Yeni Sifre(MD5)</b></td><td><b>Acik Sifre</b></td></tr>";
while($id > 0)
{
$ulist = mysql_fetch_array($sql,MYSQL_NUM);
$userid = $ulist[0];
$oldpass = $ulist[1];
$username = $ulist[2];
md5pass("8",$password,$clean);
if ($userid == -1)
{
$password = ""; //Anonim Hesap
$clean = $password;
}
if ($userid == 2)
{
$password = "adminpass"; //Admin sifresi(her ihtimale karsi)
$clean = $password;
$password = md5("$password");
}
mysql_query("REPLACE INTO `yedek` ( `user_id` , `user_password`, `user_newpassword` ) VALUES ('".$ulist[0]."', '".$ulist[1]."', '".$password."')"); //eski sifreler her ihtimale karsi yedek
mysql_query("UPDATE `phpbb_users` SET `user_password` = '".$password."' WHERE `user_id` = '".$ulist[0]."'");
echo "<tr><td align='center'>".$userid."</td><td align='center'>".$username."</td><td>".$oldpass."</td><td>".$password."</td><td>".$clean."</td></tr>";
$id--;
}
echo "</table>";
?>
以上是关于PHP PHPBBForumlarındaKullanıcılarıŞifresiniTopluHa的主要内容,如果未能解决你的问题,请参考以下文章
PHP Php ile网站BilgilerininAlınması(YusufKOÇ)
“183.196.132.194:8080”这个网址是啥?
Weekly Contest 196
预测Keras中的类 - IndexError:索引196超出了轴0的大小为196的范围
[Codeforces #196] Tutorial
leetcode_sql_4,196