首页 新闻 会员 周边

这是一个amf格式的通讯数据,哪位大哥帮我看下这个amf到底用什么格式进行压缩的?Gzip还是其他的?

0
悬赏园豆:15 [已解决问题] 解决于 2012-02-05 14:36

00000000  78 da 75 8e cb 6e c2 30 10 45 ff 65 d6 59 d8 f1   x u  n 0 E e Y 

00000010  0b 67 17 42 f8 0d 8b da 03 b5 08 e3 28 26 08 54    g B        (& T

00000020  f5 df 6b b7 c0 ae b3 bb a3 a3 73 ef 17 cc 57 37     k       s   W7

00000030  47 0f 1d ad d3 d4 c0 27 41 67 95 61 ba dd 34 70   G      'Ag a  4p

00000040  27 97 e3 c9 65 cc 39 26 72 67 7c bc 31 e8 00 91   '   e 9&rg| 1  

00000050  0b e6 03 e3 e8 ad e5 1f 1b 69 6c 38 22 1e a4 6f            il8"  o

00000060  45 40 a5 a1 81 34 23 c5 50 58 f6 df 71 b1 33 86   E@   4# PX  q 3

00000070  c9 c2 4e e9 14 c9 f9 14 f0 55 52 96 ad 19 97 2a     N      UR    *

00000080  f8 7b 54 dd ef 08 b0 c3 d8 f2 9d d2 7d af 7a 36    {T         } z6

00000090  5a 23 8d d6 7b 35 0a 21 f7 db b1 1d 54 f1 dd 70   Z#  {5 !    T  p

000000a0  a9 ab 0b cc 79 cd 4f 1b 1d 2e ef 82 05 af eb 42       y O  .     B

000000b0  91 8e a9 52 f0 fd 03 2e 1f 4f ca                     R   . O     

 

响应头信息原始头信息
Content-Type text/html; charset=UTF-8
Date Sat, 04 Feb 2012 12:12:19 GMT
Proxy-Connection Keep-alive
Server nginx/0.7.67
Transfer-Encoding chunked
X-Powered-By PHP/5.2.14
请求头信息原始头信息
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language zh-cn,zh;q=0.5
Cookie pgv_pvid=1087571583
Host app25270.qzoneapp.com
Proxy-Connection keep-alive
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20100101 Firefox/10.0
PostRequestHeaders
Content-length 182
Content-type application/octet-stream

 

夜猫子罗的主页 夜猫子罗 | 初学一级 | 园豆:174
提问于:2012-02-04 20:39
< >
分享
最佳答案
0

响应显示信息是text/html格式,也就是普通的文本内容,但看到的不是明文,所以应该是根据下面的accept-encoding压缩过,应该是gzip,解一下试试

收获园豆:15
丁学 | 专家六级 |园豆:18730 | 2012-02-04 21:05

请问一下,是将16进制字符串取出来解压呢?还是把右边的乱码取出来解压呢?

能告诉我下解压的过程吗?

解压代码我有,参数是字符串类型的,不知道对不对?

 

public static string UnZip(string value)         {             //Transform string into byte[]              byte[] byteArray = new byte[value.Length];             int indexBA = 0;             foreach (char item in value.ToCharArray())             {                 byteArray[indexBA++] = (byte)item;             }

            //Prepare for decompress              System.IO.MemoryStream ms = new System.IO.MemoryStream(byteArray);             System.IO.Compression.GZipStream sr = new System.IO.Compression.GZipStream(ms,                 System.IO.Compression.CompressionMode.Decompress);

            //Reset variable to collect uncompressed result              byteArray = new byte[byteArray.Length];

            //Decompress              int rByte = sr.Read(byteArray, 0, byteArray.Length);

            //Transform byte[] unzip data to string              System.Text.StringBuilder sB = new System.Text.StringBuilder(rByte);             //Read the number of bytes GZipStream red and do not a for each bytes in              //resultByteArray;              for (int i = 0; i < rByte; i++)             {                 sB.Append((char)byteArray[i]);             }             sr.Close();             ms.Close();             sr.Dispose();             ms.Dispose();             return sB.ToString();         }

夜猫子罗 | 园豆:174 (初学一级) | 2012-02-04 21:11

@夜猫子罗: 奇怪了,你是用什么获取到的这些数据?理论上,所有的HTTP客户端都应该会自动解码的

丁学 | 园豆:18730 (专家六级) | 2012-02-04 21:29

@丁学: 

系统自动解出来的是乱码,所以我才手动解码的。

xÚuÁnà DÿeÏ>�fÁ΍2'¨.FÁŽUý÷B¢äÖ=­F³ofÀNÙ'*9o`ÝÎ!šysNÀÈ@Õ=4°%?ý½ˆý02ªQ(…ŠŒ½ªQ#R­¥]1ßü5‡-*łœò~$7íIH»9²¿ÖÐx¬ë[ˆÓ—I—rÛ*²¾£Éál²Ïj-ž¶ýžjM{„Õ•ØKÙ9·-EçdßIlØv̑evK‡Ö[xä¥0¿õ±ÚÈC[-%áðû“Wö

不知道怎么搞的。

夜猫子罗 | 园豆:174 (初学一级) | 2012-02-04 23:29
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册