schemas.microsoft.com/2003/10/Serialization .net 在 php 中提取 base64 编码的二进制数据

问题描述 投票:0回答:1

我在 c# .net 应用程序中使用了一些数据序列化

c# .net 反序列化 xml 二进制文件

public static object DeSerializeXmlBinary(byte[] bytes)
    {
        using (XmlDictionaryReader rdr = XmlDictionaryReader.CreateBinaryReader(bytes, XmlDictionaryReaderQuotas.Max))
        {
            NetDataContractSerializer serializer; 
            serializer = new NetDataContractSerializer();
            serializer.AssemblyFormat = FormatterAssemblyStyle.Simple;
            return serializer.ReadObject(rdr);
        }
    }

我如何在 PHP 中反序列化相同的内容

更新1 要反序列化的字符串:https://pastebin.com/FrUNsm9H

将字符串解析为php函数并序列化。

解析上述序列化字符串后,基于 64 的响应将是

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAEmASEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5Ok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h6XTjGvRBB8I/MimeeBN/SOU9q2ijHCw3IZuKz57xrfgskyEWCj7s4xQP1Kkzdf7WMqI6PrzEXydx43x+Sogu+q9W3Sk5nYl9rAl+XPjOtpZ6NSA8pFkbf4fSy9KMMQEsWFniuUr6kLOpCrnzT8AXNYd1zFOhMzpvkxgoceEMFwfDxzt6lRcgbFr6D6Q5ok3dn0ZpqSkngpGUqgRPx/GL+jrUvLEL8DAkZLUs69CIK6QpI57zNkn4sLjc4Zj/Kz+2K3YEMhJIwbXptyRvlabx69g+vzh0UmVhNsjfUpe7rcZUt3zOLx77+QKyiXHqZPKvt8suI83I8oz/qQVps1/Jev8MYVlBWHth1EJV+qzGYABuoGF71a376XmR1qOfQ0/PHnSQFKcmzpq1pReUzi5owpsQrWJGuLN6s4VpO/8GJxiqsF06Tnt73AjxVUm5uNKU10ayfInhKTglDLhjpBGU5g0K9Qmo0JpJbWgAvSjYiaA4eS77ctmVPzdueP3DSn8f5ygCbxbT/w6v4LEwRGk+yonn4SdVHowKIviz+f/AA==

到目前为止我发现了什么

  1. 该字符串是我首先从 Base64 解码的
    base64_decode()
  2. 然后我将绳子放气
    gzinflate()
  3. 解析字符串之后,这就是我到达的地方。

步骤 1 和 2 我已在 C# 代码库中确认,并且输出是预期的。

更新3

解析c#中的代码

 ms = new MemoryStream(((System.Byte[])DecompressData(System.Convert.FromBase64String(Convert.ToString(__DBSTRING__)))));
 byte[] byteArr = ms.ToArray();
___OUTPUT___= Convert.ToBase64String(byteArr);


private static object DecompressData(byte[] inb)
    {
        byte[] outb;
        using (MemoryStream istream = new MemoryStream(inb))
        {
            using (MemoryStream ostream = new MemoryStream())
            {
                using (System.IO.Compression.DeflateStream sr =
                    new System.IO.Compression.DeflateStream(istream, System.IO.Compression.CompressionMode.Decompress))
                {
                    sr.CopyTo(ostream);
                } outb = ostream.ToArray();
            }
        } return DeSerializeXmlBinary(outb);
    }

xml部分是我不明白为什么?

c# php serialization base64 datacontractserializer
1个回答
0
投票

查看了 .NET XML 二进制格式规范后, 这是从序列化

byte[]
数组中提取数据的简单方法:

function extractData($ser)
{
    $pos = 154;
    if($ser[$pos] != "\xA0")
        throw new Exception('Bytes16Text record not found');
    $a = unpack('vlen', substr($ser, $pos+1, 2));
    $len = $a['len'];
    $data = substr($ser, $pos+3, $len);

    $pos += 3 + $len;
    if($ser[$pos] != "\x9F")
        throw new Exception('Bytes8TextWithEndElement record not found');
    $a = unpack('Clen', substr($ser, $pos+1, 1));
    $len = $a['len'];
    $data .= substr($ser, $pos+2, $len);

    return $data;
}

$db = file_get_contents('db.txt');
$ser = gzinflate(base64_decode($db));
$image = extractData($ser);
file_put_contents('image.jpg', $image);
© www.soinside.com 2019 - 2024. All rights reserved.