所以我有一个 API 端点,它应该获取 protobufs bin 文件。它是用 C# 编写的并使用 protobufs-net。
当我尝试将文件发送到此端点时,出现以下错误:
RUnexpected end-group in source data; this usually means the source data is corrupt
我尝试了以下请求(从 bin 文件解码):
POST /api/protobufs HTTP/1.1
Host: xyz
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-protobuf
Connection: close
Upgrade-Insecure-Requests: 1
Content-Length: 3555
1 {
1: "4f81b7bb-d8bd-e911-9c1f-06ec640006bb"
2: 0x404104bc4ed047ac
3: 0x4049c4fee8a8cb66
4: 0x40400000
5 {
1: "53f8afde-04c6-e811-910e-4622e9d1766e"
2 {
1: "e993fba0-8fc9-e811-9c15-06ec640006bb"
}
2 {
1: "9a7c7210-3aca-e811-9c15-06ec640006bb"
2: 1
}
2 {
1: "2d7d12f1-2bc9-e811-9c15-06ec640006bb"
}
3: 18446744073709551615
}
6: 159
7: 1571059251000
}
1 {
1: "4f81b7bb-d8bd-e911-9c1f-06ec640006bb"
2: 0x404104d746a35280
3: 0x4049c5125c231685
4: 0x40400000
5 {
1: "53f8afde-04c6-e811-910e-4622e9d1766e"
2 {
1: "e993fba0-8fc9-e811-9c15-06ec640006bb"
}
2 {
1: "9a7c7210-3aca-e811-9c15-06ec640006bb"
2: 1
}
2 {
1: "2d7d12f1-2bc9-e811-9c15-06ec640006bb"
}
3: 18446744073709551615
}
6: 95
7: 1571059255000
}
当我尝试上传 bin 文件本身时,出现以下错误:
Invalid wire-type; this usually means you have over-written a file without truncating or setting the length; see https://stackoverflow.com/q/2152978/23354
请求是:
POST /api/protobufs HTTP/1.1
Host: xyz
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: application/x-protobuf,text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Content-Type: application/octet-stream
Upgrade-Insecure-Requests: 1
Content-Length: 2029
õ
$4f81b7bb-d8bd-e911-9c1f-06ec640006bb ¬GÐN¼ A@ f˨èþÄI@%��@@*«
$53f8afde-04c6-e811-910e-4622e9d1766e &
$e993fba0-8fc9-e811-9c15-06ec640006bb (
$9a7c7210-3aca-e811-9c15-06ec640006bb &
$2d7d12f1-2bc9-e811-9c15-06ec640006bb ÿÿÿÿÿÿÿÿÿ 0Ÿ 8¸î¶ÓÜ-
我尝试了内容类型application/x-protobuf
和application/octet-stream
我发送正确吗?我怎样才能发送文件。(我在这部分使用了 burp 套件)