### Base64编码变体？我有base64编码数据不能正确解码

``````>>> base64.b64decode('AgAOAAAAQQEA3AcKDhIyCNwHCg4SMgyYIzSWoACP1T2TRRw1MTExMDUwMTE2ICAAAAAAAAAAAAAA3AAjU1QsKzAyMjEuMGxiDQo=')
'\x02\x00\x0e\x00\x00\x00A\x01\x00\xdc\x07\n\x0e\x122\x08\xdc\x07\n\x0e\x122\x0c\x98#4\x96\xa0\x00\x8f\xd5=\x93E\x1c5111050116  \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00#ST,+0221.0lb\r\n'
``````

#### 1 个答案:

``````>>> t = base64.b64decode('AgAOAAAAQQEA3AcKDhIyCNwHCg4SMgyYIzSWoACP1T2TRRw1MTExMDUwMTE2ICAAAAAAAAAAAAAA3AAjU1QsKzAyMjEuMGxiDQo=')
``````

``````>>> print int(t[9:11][::-1].encode("hex"), 16), int(t[11].encode("hex"), 16), int(t[12].encode("hex"), 16), int(t[13].encode("hex"), 16), int(t[14].encode("hex"), 16), int(t[15].encode("hex"), 16)
2012 10 14 18 50 8

>>> print int(t[16:18][::-1].encode("hex"), 16), int(t[18].encode("hex"), 16), int(t[19].encode("hex"), 16), int(t[20].encode("hex"), 16), int(t[21].encode("hex"), 16), int(t[22].encode("hex"), 16)
2012 10 14 18 50 12
``````

BT是，你只需要添加'：'每两个字母：

``````>>> t[23:29][::-1].encode("hex")
'00a096342398'
``````

SN是：

``````>>> t[35:47]
'5111050116  '
``````

``````>>> t[63:72]
'+0221.0lb'
``````