Welcome, Guest. Please Login or Register.
October 31, 2024, 11:52:48 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Converters  |  Password encyption « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: Password encyption  (Read 5693 times)
funkissential
Noobie
*
Posts: 18


I'm a llama!

Password encyption
« on: May 21, 2003, 02:59:37 PM »
Reply with quote

Hi,

I am planning on munallly converting from my companys old forum - webwiz to yabbse now it all seems to look ok barr 1 probably i have encountered, i have de encrypted all the passwords from webwiz but dont know how to re encrypt them for yabbse can anyone help with this or is there a script to do it?

Any help much appreciated.

SJ
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Password encyption
« Reply #1 on: May 21, 2003, 04:26:04 PM »
Reply with quote

what encryption method do you use for your old forum?
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
funkissential
Noobie
*
Posts: 18


I'm a llama!

Re:Password encyption
« Reply #2 on: May 21, 2003, 06:41:34 PM »
Reply with quote

The old forum did not encrypt the passwords only th access database they where held in.
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:Password encyption
« Reply #3 on: May 21, 2003, 07:05:41 PM »
Reply with quote

You should be able to find how they are encrypted in register.php
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Password encyption
« Reply #4 on: May 21, 2003, 11:03:44 PM »
Reply with quote

If you just md5 them, YaBB SE will upgrade the encryption next time they log in.

-[Unknown]
Logged
funkissential
Noobie
*
Posts: 18


I'm a llama!

Re:Password encyption
« Reply #5 on: May 22, 2003, 04:52:26 PM »
Reply with quote

Sorry to sound daft but how do i do that?>
Logged
Daniel Hofverberg
YaBB God
*****
Posts: 582


WWW
Re:Password encyption
« Reply #6 on: May 25, 2003, 08:23:37 PM »
Reply with quote

In PHP something like md5(password); (where password is the password in question). So if the password is hello, just use md5('hello');.

Similar functions should exist in most programming languages...
Logged
funkissential
Noobie
*
Posts: 18


I'm a llama!

Re:Password encyption
« Reply #7 on: May 27, 2003, 02:50:29 PM »
Reply with quote

How would you encrypt 1000 of them, any way of automastically7 doing it like phasing a text file so it encrypts each line then prints back out the file.
Logged
Daniel Hofverberg
YaBB God
*****
Posts: 582


WWW
Re:Password encyption
« Reply #8 on: May 27, 2003, 08:33:30 PM »
Reply with quote

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($handle4096);
    
fwrite($outputhandlemd5($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
funkissential
Noobie
*
Posts: 18


I'm a llama!

Re:Password encyption
« Reply #9 on: June 16, 2003, 09:04:59 PM »
Reply with quote

Hi ya

Thanks ofr that code, unfortunately all the passwords are encrypted then they odne work  some of hte time!!! Some do and some dont, any ideas why this is hte case?
Logged
funkissential
Noobie
*
Posts: 18


I'm a llama!

Re:Password encyption
« Reply #10 on: June 16, 2003, 09:08:49 PM »
Reply with quote

Had a look, now sometimes the code you wrote above outputs the irght passwords which work, normally when htere is only 1 password in the text file. when there are lots the passwrds encrypt wrongly any idea why this is?
Logged
Daniel Hofverberg
YaBB God
*****
Posts: 582


WWW
Re:Password encyption
« Reply #11 on: June 16, 2003, 10:03:45 PM »
Reply with quote

Good question, I'm not sure... It might have to do with extra linefeeds or similar being added to the passwords.

Try adding this line before the line that starts with fwrite:

$buffer = rtrim($buffer,"\n\r");

I'm not sure if it will do any good, but it's worth a try. It can't do any harm anyway...  :)
Logged
funkissential
Noobie
*
Posts: 18


I'm a llama!

Re:Password encyption
« Reply #12 on: June 16, 2003, 10:20:32 PM »
Reply with quote

Been looking through the code - loginout.php and it mentions md5 and anotehr ofrm of encryption cryt, is it possible to have yabbse work in md5 mode if so how as this may help.

Also been trying verious line spaces uploading in binary asci and now its not working!!!

Getting desperate.
Logged
funkissential
Noobie
*
Posts: 18


I'm a llama!

Re:Password encyption
« Reply #13 on: June 16, 2003, 10:27:37 PM »
Reply with quote

Thankyou!!! Looks like its working!!! Fingers crossed!!!
Logged
Daniel Hofverberg
YaBB God
*****
Posts: 582


WWW
Re:Password encyption
« Reply #14 on: June 16, 2003, 10:27:55 PM »
Reply with quote

Didn't my extra line do any difference?
Logged
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Converters  |  Password encyption « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.103 seconds with 20 queries.