Blogger Jateng

Convert a plain password in a field in mysql into md5 format

Problem : wanna convert a plain password in a field in mysql into md5 format
Solution :
1. export mysql selected field to text
2. convert field md5

hows? ok start

solution 1 :

SELECT password INTO OUTFILE 'C:/result.txt'
LINES TERMINATED BY '\n'
FROM users;

explanation :
- password : the field u want to export
-users the table

solution 2 :

make a php file one folder with u'r result, then create this


function tep_encrypt_password($plain){
$salt = substr(md5(uniqid(rand(), true)), 0, 9);
$password = md5($salt.$plain).':'.$salt;
return $password;
}

$passes = file('result.txt');

foreach($passes as $key => $pass){
$line = explode(" ", $pass);
// the password is in $line[1], the email is in $line[0]
$line[1] = tep_encrypt_password($line[1]);
$passes[$key] = implode(" ", $line);
}
$passes = implode("\n", $passes);
file_put_contents('result2.txt', $passes);

?>

1 comment for "Convert a plain password in a field in mysql into md5 format"

Anonymous 7:27 PM Delete Comment
Hello all
http://www.horsemanssource.com/ - clomid price
Moreover, let your doctor know about the following things prior to being prescribed with Clomid: • If you have an endocrine disorder; • If you have uterine fibroids or liver disease; • If you have endometrial carcinoma or endometriosis; • If you’re experiencing undiagnosed vaginal bleeding; or • If you have any other chronic or serious medical illness.
[url=http://www.horsemanssource.com/]clomid ovulation[/url]
Moreover, let your doctor know about the following things prior to being prescribed with Clomid: • If you have an endocrine disorder; • If you have uterine fibroids or liver disease; • If you have endometrial carcinoma or endometriosis; • If you’re experiencing undiagnosed vaginal bleeding; or • If you have any other chronic or serious medical illness.
generic clomid
Generally, Clomid is taken in five days cycle.