| | |
hashing passwords - forgetful users?!
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 522
Reputation:
Solved Threads: 61
0
#2 Oct 23rd, 2009
its not possible the crack the md5 encrypted string , because its an one sided encryption.
Its been done with the huge database actually. Have a look at this -
http://md5crack.com/crackmd5.php
Its been done with the huge database actually. Have a look at this -
http://md5crack.com/crackmd5.php
Last edited by network18; Oct 23rd, 2009 at 3:48 am.
0
#3 Oct 23rd, 2009
You need to understand that a salted hash is irreversible (without the original text and salt). Thats the point of it.
You either need to generate them a new password and send it to them or give them access to a reset password page on your site.
By the reset password page, I mean you need to send them a link with a unique code only for them. I also set a cookie with another random string and compare the two with the database entry. If they match then they put in their new password.
You either need to generate them a new password and send it to them or give them access to a reset password page on your site.
By the reset password page, I mean you need to send them a link with a unique code only for them. I also set a cookie with another random string and compare the two with the database entry. If they match then they put in their new password.
Google is your friend.
Use [code] tags.
If you have found a solution to your problem, please mark the thread as SOLVED.
Use [code] tags.
If you have found a solution to your problem, please mark the thread as SOLVED.
0
#5 34 Days Ago
There isn't an effective way to do this.
The best way would allow the users to reset their password and send them a copy via email.
I was pretty new to php when I made this but you can make your own adjustments.
email them with $newpassword & add safepword to your Database.
The best way would allow the users to reset their password and send them a copy via email.
I was pretty new to php when I made this but you can make your own adjustments.
PHP Syntax (Toggle Plain Text)
<?php //3 arrays of random numbers and letters $caps = array("A", "B", "C", "D", "E", "F"); $lcase = array("a", "b", "c", "d", "e", "f"); $num = array("1", "2", "3", "4", "5", "6"); //radnomly generate a password using caps, lcase & num $char1 = $caps[round(rand(-0.4, 5.4))]; $char2 = $lcase[round(rand(-0.4, 5.4))]; $char3 = $num[(round(rand(-0.4, 5.4)))]; $char4 = $caps[round(rand(-0.4, 5.4))]; $char5 = $num[(round(rand(-0.4, 5.4)))]; $char6 = $lcase[round(rand(-0.4, 5.4))]; $char7 = $caps[round(rand(-0.4, 5.4))]; $char8 = $num[round(rand(-0.4, 5.4))]; $newpassword = $char1.$char2.$char3.$char4.$char5.$char6.$char7.$char8; //this is just to make md5 more secure, you may want to remove this if you dont add anything to your passwords. $randomword = "salt"; $safepword = md5($newpassword.$randomword);
email them with $newpassword & add safepword to your Database.
Last edited by liamfriel; 34 Days Ago at 9:46 am.
They throw us away like yesterdays jam - Maurice Mossley
Please - rep if someone helps you, it can't be traded for stuff, but it's nice.
Please - rep if someone helps you, it can't be traded for stuff, but it's nice.
![]() |
Similar Threads
- Error user alreday exists (PHP)
- security concerns (PHP)
- Password protect with cookie (JavaScript / DHTML / AJAX)
- Create users (Shell Scripting)
- md5 superhashing (PHP)
- FTP configuration for online use (Windows Servers and IIS)
- I have some questions that I need help with (Networking Hardware Configuration)
- Final Year Project [Proposal] (Computer Science)
- HTML question (JavaScript / DHTML / AJAX)
Other Threads in the PHP Forum
- Previous Thread: PHP Banner Rotation
- Next Thread: How to reference one function from another from within a class in php
| Thread Tools | Search this Thread |







