3

AMF3 が含まれている AMF0 メッセージをデコードしようとしています。

  channel=3  size=134  pkttype=0x11  time=1973

  00000: 00 02 00 14 73 65 6E 64  55 6E 69 76 65 72 73 61  6C 4D 65 73     ....sendUniversalMes
  00020: 73 61 67 65 00 00 00 00  00 00 00 00 00 05 02 00  11 6D 62 5F     sage.............mb_
  00040: 31 32 32 31 30 5F 37 35  39 32 33 33 38 30 05 00  40 58 C0 00     12210_75923380..@X..
  00060: 00 00 00 00 11 0A 0B 01  09 68 62 69 64 04 81 CF  5E 09 73 72     .........hbid...^.sr
  00080: 63 65 06 49 63 37 62 39  32 33 65 65 2D 30 61 30  38 2D 34 62     ce.Ic7b923ee-0a08-4b
  00100: 61 32 2D 38 65 37 63 2D  63 38 32 61 39 33 64 37  37 31 34 32     a2-8e7c-c82a93d77142
  00120: 09 68 62 64 6C 04 00 09  74 65 78 74 01 01                        .hbdl...text..

  first byte I skip 
  02 = string
  00 14 = length of string ( 20 characters , sendUniversalMessage )
  00 00 00 00 00 00 00 00 00 = number = 0
  05 = null
  02 = string
  00 11 = length of string ( 17 characters , mb_12210_75923380 )
  05 = null
  00 40 58 C0 00 00 00 00 00 = number = 99
  11 = AMV+

  here is where I have problems

  0A = AMF3 object 
  now I need to do a readU29 which starts with
  0B = what does this mean
  01 = what does this mean
  09 = what does this mean

  where is the length of the string 'hbid' ?
4

1 に答える 1

3

U29 では、最初のバイトの値が 128 未満の場合、最初のバイトに収まります。したがって、これを 0B、01、09 に相当する 3 つの異なる u29 として読み取る必要があります。

0B: オブジェクトのタイプに関する詳細。あなたはそのバイトにあまり興味がないようで、複雑なのでパスしてください。

01: LSB は、これが文字列参照ではないことを示すビットです。01 >> 1 = 0 はクラス名の長さです。これは、空の文字列を意味します。これは、これが匿名 (型指定されていない) オブジェクトであることを意味します。

09: = 00001001. LSB は、これが文字列参照ではないことを示すビットでもあります。1001 >> 1 = 0100 = 4 が文字列の長さです。

それが役立つことを願っています

于 2012-08-29T14:15:40.043 に答える