|
|
|
|
|
|
|
|
Daniel Hofverberg
YaBB God
Posts: 582
|
|
Re:Password encyption
« Reply #8 on: May 27, 2003, 08:33:30 PM » |
|
Sure, that wouldn't be hard.
Try this PHP script - I just threw it together very quickly and have only tested it with a few passwords, but it should work:
<?php $handle = fopen ("passwords.txt", "r"); $outputhandle = fopen("encryptedpasswords.txt", "a"); while (!feof ($handle)) { $buffer = fgets($handle, 4096); fwrite($outputhandle, md5($buffer) . "\n"); } fclose ($handle); fclose ($outputhandle); ?> <h1>Done</h1>
Put all passwords in "passwords.txt" (one per line), upload passwords.txt along with this script (call it passwords.php or whatever) to any directory which is world writable (CHMOD 777) or upload an empty file called "encryptedpasswords.txt" and CHMOD it 777 (that way, the directory won't have to be writable). Execute the script in the browser, and when it's done, the file encryptedpasswords.txt will contain the MD5'd versions of the original passwords, one per line.
And of course, delete those files from the server when you're done!
As I said, not tested too thoroughly and I'm certainly no expert in PHP, but it should work - It worked for me with a few passwords anyway...
|
|
|
Logged
|
|
|
|
|
|
|
|
|
|