b64 decoding

Status
Not open for further replies.

Logic

Bobby Billionaire
Feb 8, 2012
748
207
I've recovered a panel of mine from a long time ago, and I don't remember it. So I am needing the password to be decoded from b64 encoding.

b64 string: 2380d7f30c9e13bb2191e1179eb5253e

Here's the code that was for the b64 storage:

Code:
[COLOR=#000000]$crypt_typed_pword = NULL;[/COLOR]
[COLOR=#000000]$crypt_mysql_pword = NULL;[/COLOR]
[COLOR=#000000]$b64_pword1 = base64_encode($safe_pword);[/COLOR]
[COLOR=#000000]$b64_pword2 = base64_encode($b64_pword1);[/COLOR]
[COLOR=#000000]$b64_pword3 = base64_encode($b64_pword2);[/COLOR]
[COLOR=#000000]$b64_pword4 = base64_encode($b64_pword3);[/COLOR]
[COLOR=#000000]$b64_pword = base64_encode($b64_pword4);[/COLOR]
[COLOR=#000000]$crypt_typed_pword = crypt($b64_pword, '$5$');[/COLOR]
[COLOR=#000000]$crypt_mysql_pword = crypt($pword_data['password'], '$5$');[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]if($crypt_typed_pword == '' ||$crypt_mysql_pword == '')
[/COLOR]
 

Clawed

Whats occuring?
Jun 2, 2012
51
3
Best way to base64 encoding for me is.

1. database row's "password" & "password_time"
2. base64_encode($password.time());
3. insert password and time() in the users database row
4. to decode it you'll need password & time row.

Example:
PHP:
$row = mysql_fetch_assoc($query);
$decode = $row['password'].$row['password_time'];
echo base64_decode($decode);

That's how i use my base64 encode & decode, makes it more secure.
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Best way to base64 encoding for me is.

1. database row's "password" & "password_time"
2. base64_encode($password.time());
3. insert password and time() in the users database row
4. to decode it you'll need password & time row.

Example:
PHP:
$row = mysql_fetch_assoc($query);
$decode = $row['password'].$row['password_time'];
echo base64_decode($decode);

That's how i use my base64 encode & decode, makes it more secure.
This wouldn't work because he encoded it multiple times, and used the crypt() function.

I don't think you are possible to decode this, what you could do: delete the encryption from the code and change it to a plain text to log in.
 

Clawed

Whats occuring?
Jun 2, 2012
51
3
This wouldn't work because he encoded it multiple times, and used the crypt() function.

I don't think you are possible to decode this, what you could do: delete the encryption from the code and change it to a plain text to log in.

I know that wouldn't work for him, but if he did it that way in the first place, it's harder for people to crack the passwords if the database gets leaked.
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
I know that wouldn't work for him, but if he did it that way in the first place, it's harder for people to crack the passwords if the database gets leaked.
Then why use a base64 encode? Just use a md5 and sha265 hash or something like that..
 
Status
Not open for further replies.

Users who are viewing this thread

Top