I've been asked to design back-end in php for a web app having ASP front-end. So I can't really dig up those ASP files. I have the MySQL database - that's it! The programmer who made the front-end isn't responding.
我被要求在php中设计后端,以获得具有ASP前端的Web应用程序。所以我无法真正挖掘出那些ASP文件。我有MySQL数据库 - 就是这样!制作前端的程序员没有回应。
How do I decode this? Or just this - "what's the name of this encryption method?"
我该如何解码呢?或者只是这个 - “这种加密方法的名称是什么?”
It looks something like HEX though.
它看起来像HEX。
Another sample - 0E0800160E0330595D57
另一个样本 - 0E0800160E0330595D57
0 1 2 3 4 5 6 7 8 9
0E 0B 02 06 01
0E 08 00 16 0E 03 30 59 5D 57
UPDATE - When I change my password to "kachwa" (without quotes), it gets updated as 040E0C07180E
in the database.
更新 - 当我将密码更改为“kachwa”(不带引号)时,它会在数据库中更新为040E0C07180E。
1 个解决方案
#1
4
Each byte is xor'd with 0x6f.
每个字节与0x6f xor'd。
PHP sample encryption:
PHP示例加密:
function enc($pass)
{
$enc = '';
for ($i = 0; $i < strlen($pass); ++$i)
$enc .= sprintf("%02x", ord($pass[$i]) ^ 0x6f);
return $enc;
}
echo enc("kachwa"),"\n";
Output:
040e0c07180e
And for the sake of completeness:
为了完整起见:
function dec($pass)
{
$dec = '';
foreach (str_split($pass, 2) as $hex)
$dec .= chr(hexdec($hex) ^ 0x6f);
return $dec;
}
echo dec("040e0c07180e"),"\n";
#1
4
Each byte is xor'd with 0x6f.
每个字节与0x6f xor'd。
PHP sample encryption:
PHP示例加密:
function enc($pass)
{
$enc = '';
for ($i = 0; $i < strlen($pass); ++$i)
$enc .= sprintf("%02x", ord($pass[$i]) ^ 0x6f);
return $enc;
}
echo enc("kachwa"),"\n";
Output:
040e0c07180e
And for the sake of completeness:
为了完整起见:
function dec($pass)
{
$dec = '';
foreach (str_split($pass, 2) as $hex)
$dec .= chr(hexdec($hex) ^ 0x6f);
return $dec;
}
echo dec("040e0c07180e"),"\n";