I was trying to recover some password data on my SQL SERVER 2012 files, unfortunately I forgot what encryption was used in encoding the password to the tables. I know that 0x3132333435
translates as 12345
, as this was my test account before.
I tried to use hexdec()
but no luck, there seems to be a pattern with the structure of the password. 0x3132333435
translates as 0x3(1)3(2)3(3)3(4)3(5)
with the data 12345 being 'sandwiched' between hex 0x3 and 3's.
This is one of my code's part.
$_SESSION['error'] = 'Cannot find account with the username';
} else {
$row = sqlsrv_fetch_array($query, SQLSRV_FETCH_ASSOC);
if (hexdec($password, $row['password'])) {
$_SESSION['admin'] = $row['id'];
}
else{
$_SESSION['error'] = 'Incorrect password';
}
}
I've read some of the topics about this as well, but I don't have any idea on how to implement it:
Currently, classes "wep" and "wpa" are suported. The WEP (Wired Equivalent Privacy) key can be either 5 or 13 bytes long. It can be provided either as an ASCII or hexadecimal string -- thus "12345" and "0x3132333435" are equivalent 5-byte keys (the "0x" prefix may be omit- ted). A file containing a WEP key must consist of a sin- gle line using either WEP key format. The WPA (Wi-Fi Protected Access) key must be provided as an ASCII string with a length between 8 and 63 bytes.
Is it possible to do it manually? Or is there some link that I can use as a guide or reference?
I am trying to use the old table (user's masterfile) so that my old users can still access the system. I'm currently using hash()
for my new password table.