这个base64对象的结果是加密的吗?

时间:2013-04-15 07:46:44

标签: python json base64

我正在尝试将自己的界面写入网络聊天服务。唯一的问题是,我无法理解服务器的返回。与服务器的通信很容易解码,但我想知道服务器响应是否以某种方式加密/压缩。包头将结果指定为“application / json”。

使用fiddler2,我从服务器拦截了以下http包:

vS1gN7zSnVkl7tP4+ygk4f0uJWxWH532dgLhMxYMh8dFCNfyHrkiPCtjS+TPzryHBECM3pVv90GgNI9xkLKNjR9pQ0PUpHAL2TAmRmxSbHCwmEwbDJ2WLLwMwIXdeaQWgbIxfZG5wkdH58JHqwf2FxCaGrVTidkeUDKdCBEZtnpXUoKUizpxzPB+r4KeTTc3vIMk/x/1LbIgumVWq0HEnHFGnYk2Dy1PjfiSJ+MdTus=

查看代码类型,我认为它是base64编码的。使用python我运行简单的命令:

import base64
print base64.decodestring("string above")

但它只会带来胡言乱语。将repr()添加到上面的结果中,它会返回:

'\xbd-`7\xbc\xd2\x9dY%\xee\xd3\xf8\xfb($\xe1\xfd.%lV\x1f\x9d\xf6v\x02\xe13\x16\x0c\x87\xc7E\x08\xd7\xf2\x1e\xb9"<+cK\xe4\xcf\xce\xbc\x87\x04@\x8c\xde\x95o\xf7A\xa04\x8fq\x90\xb2\x8d\x8d\x1fiCC\xd4\xa4p\x0b\xd90&FlRlp\xb0\x98L\x1b\x0c\x9d\x96,\xbc\x0c\xc0\x85\xddy\xa4\x16\x81\xb21}\x91\xb9\xc2GG\xe7\xc2G\xab\x07\xf6\x17\x10\x9a\x1a\xb5S\x89\xd9\x1eP2\x9d\x08\x11\x19\xb6zWR\x82\x94\x8b:q\xcc\xf0~\xaf\x82\x9eM77\xbc\x83$\xff\x1f\xf5-\xb2 \xbaeV\xabA\xc4\x9cqF\x9d\x896\x0f-O\x8d\xf8\x92\'\xe3\x1dN\xeb'

我尝试通过各种版本的unicode和其他编码方案解析这个,但我无法理解它。任何人对我有什么想法如何进行?


编辑:更多示例:

vS1gN7zSnVkl7tP4+ygk4f0uJWxWH532d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