MewX / KanTV-downloader-cli

(KanTV is down forever) “看TV”下载器,命令行版,使用Android API,Go语言编写。 Downloading KanTV videos via command line interface (CLI) written in Go.
GNU General Public License v3.0
2 stars 1 forks source link

Figuring out how the response get decoded #13

Open MewX opened 5 years ago

MewX commented 5 years ago

How do I decode this sequence?

00000000  82 a6 73 74 61 74 75 73 cd 01 94 a3 6d 73 67 b2     status    msg 
00000010  e5 b8 90 e5 8f b7 e4 b8 8d e5 ad 98 e5 9c a8 ef                   
00000020  bc 81   

It shows ��status���msg�帐号不存在!.

MewX commented 5 years ago

In CommonCallback.java, I saw this:

        paramCall = MessagePack.newDefaultUnpacker(((ResponseBody)paramResponse.body()).bytes());
        if (paramCall != null)
        {
          this.json = paramCall.unpackValue().toString();
          paramCall.close();
          break label77;
          this.json = "";
MewX commented 5 years ago

一切不使用 protocol buffer 的都是邪教!

I will use https://github.com/ugorji/go to unpack the message.

image

MewX commented 4 years ago

Also checked latest version v3.1.2, there doesn't seem to have much difference. So, I'll use the decompiled version to maintain this app.