dakata
08-23-2011, 11:56 PM
Hi ,
I managed to install a script in my website , it's more like a password recovery script , but it sends the username as well.
So the problem I have is that when I recive the email , where it says "Your Password Is:" it will show me the encrypted password form the database. Thing is I need the original password (or should I say the decrypted one..) to enter again in the account.
If you can help me, please let me know :)
Here is the script
<?php
include_once"configure.php";
$email=$_POST['email'];
$email=mysql_real_escape_string($email);
if($email<>""){
$check_user_data = mysql_query("SELECT * FROM tz_members WHERE email = '$email'") or die(mysql_error());
if(mysql_num_rows($check_user_data) == 0)
{echo '<script language="javascript">alert("This email address does not exist. Please try again.")</script>;';unset($email);}
else {$row = mysql_fetch_array($check_user_data);$email=$row['email'];
$to = $email;
$subject = "Games.CsuNo.nET Recovery System";
$message = "This is in response to your request for login details as user of your Members Area page.\n\nYour User Name is ".$row['usr'].".\n\nYour Users Password is ".$row['pass'].".\n\nYou may use your password to login in your account settings to change your password or your email.\n\nDon't give your password to anyone, but do save it somewhere safe.\n\nFor futured information about your account or any problems, please contact us at support@cs-uno.net.\n\nEnjoy your members area account and have fun.\n\nRegards,\n\nGames.CsuNo.nET Owner";
$headers = "From: ".$psbhostemailaddress."\r\nReply-To: ".$email;
if(mail($to, $subject, $message, $headers)){echo "<font face='Verdana' size='2'><b><br>Success!</b> <br>An email has been sent with your details (username and password) to your email address $email <br>Please check your mail.";}
else{echo "<font face='Verdana' size='2' color=red>There is some system problem in sending login details to your address. <br><br><input type='button' value='Retry' onClick='history.go(-1)'></font>";}
}}
?>
And here is the trouble line
Your Users Password is ".$row['pass']"
This is the image from the email , showing the md5 encrypted password:
http://s3.postimage.org/u753bdtw/email.jpg (http://postimage.org/image/u753bdtw/)
And this is the encrypted password from the database:
http://s3.postimage.org/u78ee2tg/image.jpg (http://postimage.org/image/u78ee2tg/)
Thanks for helping, dakata
I managed to install a script in my website , it's more like a password recovery script , but it sends the username as well.
So the problem I have is that when I recive the email , where it says "Your Password Is:" it will show me the encrypted password form the database. Thing is I need the original password (or should I say the decrypted one..) to enter again in the account.
If you can help me, please let me know :)
Here is the script
<?php
include_once"configure.php";
$email=$_POST['email'];
$email=mysql_real_escape_string($email);
if($email<>""){
$check_user_data = mysql_query("SELECT * FROM tz_members WHERE email = '$email'") or die(mysql_error());
if(mysql_num_rows($check_user_data) == 0)
{echo '<script language="javascript">alert("This email address does not exist. Please try again.")</script>;';unset($email);}
else {$row = mysql_fetch_array($check_user_data);$email=$row['email'];
$to = $email;
$subject = "Games.CsuNo.nET Recovery System";
$message = "This is in response to your request for login details as user of your Members Area page.\n\nYour User Name is ".$row['usr'].".\n\nYour Users Password is ".$row['pass'].".\n\nYou may use your password to login in your account settings to change your password or your email.\n\nDon't give your password to anyone, but do save it somewhere safe.\n\nFor futured information about your account or any problems, please contact us at support@cs-uno.net.\n\nEnjoy your members area account and have fun.\n\nRegards,\n\nGames.CsuNo.nET Owner";
$headers = "From: ".$psbhostemailaddress."\r\nReply-To: ".$email;
if(mail($to, $subject, $message, $headers)){echo "<font face='Verdana' size='2'><b><br>Success!</b> <br>An email has been sent with your details (username and password) to your email address $email <br>Please check your mail.";}
else{echo "<font face='Verdana' size='2' color=red>There is some system problem in sending login details to your address. <br><br><input type='button' value='Retry' onClick='history.go(-1)'></font>";}
}}
?>
And here is the trouble line
Your Users Password is ".$row['pass']"
This is the image from the email , showing the md5 encrypted password:
http://s3.postimage.org/u753bdtw/email.jpg (http://postimage.org/image/u753bdtw/)
And this is the encrypted password from the database:
http://s3.postimage.org/u78ee2tg/image.jpg (http://postimage.org/image/u78ee2tg/)
Thanks for helping, dakata