Chinaunix首页 | 论坛 | 博客
  • 博客访问: 717681
  • 博文数量: 107
  • 博客积分: 5079
  • 博客等级: 大校
  • 技术积分: 1330
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-10 10:58
文章分类

全部博文(107)

文章存档

2017年(1)

2015年(8)

2014年(8)

2012年(2)

2011年(7)

2010年(8)

2009年(20)

2008年(53)

分类:

2009-07-15 15:22:15

回复包解密后,里面带着的链接地址就是P2SP的多个可供下载的服务器的链接地址.
而且回复里面包含一些文件相关的信息,比如SHA-1 HASH值之类的,大家有兴趣的话,可以自
已分析它的包的结构,我下篇文章分析它的包结构,呵呵:)

注意,上面的发送包和回复包不是关联的,因为我调试的时候没有把它们关取在一起,送了不同的包进行分析的.

好了,客户端与服务器之间的获取多个下载源的加密通信过程就到此结束了,这儿我主要的只介绍
它们通信的加密算法而已,具体其它的协议以后有时间再发.

                时间仓促,如有不足之处,还请多多指教.

最后附上加解密的源代码.
#include
#include
#include
#include "thunder-md5.h"


unsigned char thunder[]={
         0x34, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,0x80,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

unsigned char thunder_md5_pad[]={
         0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
         0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
unsigned char thunder_AES_key[16];//thunder MD5 padding data

unsigned char in[]={0x02,0x3A,0xA0,0x8A,0x5E
,0x52,0x22,0xAC,0x5E,0xFA,0xC8,0xF6,0x54,0xE8,0xDC,0x9A,0xBC,0xE6,0x78,0x11,0xD9
,0x59,0xC3,0xE8,0x64,0x8E,0xB8,0x93,0xEA,0xE7,0x43,0x28,0xBA,0x16,0xFF,0xC4,0xA9
,0xDC,0xAB,0x26,0x7C,0x56,0x08,0x47,0xD9,0xA9,0x37,0xF6,0xC1,0x3A,0x7B,0x68,0xC8
,0x11,0x74,0x9D,0x62,0x6D,0x4C,0x6C,0xE7,0xAD,0x08,0x46,0x70,0x31,0xAC,0x97,0x34
,0xAE,0x15,0x18,0x37,0xB3,0x97,0x32,0x91,0x13,0xF8,0xFB,0xAA,0x30,0x75,0x10,0x02
,0x78,0x8E,0xF6,0x38,0x1D,0x43,0x6B,0xB9,0xF4,0xDE,0xC4,0x09,0x23,0x3A,0x27,0x8B
,0xE6,0x2C,0x5D,0x87,0xBF,0x4C,0xBF,0xBF,0x54,0x15,0x4E,0xDB,0x8F,0x77,0x95,0xC0
,0x67,0xEE,0x1E,0xB4,0xB4,0x36,0xF6,0xEF,0xCF,0x96,0x77,0x1A,0xEA,0x9E,0x63,0x11
,0x40,0xFC,0xE1,0x23,0x81,0x90,0x92,0x5E,0xFE,0x23,0x36,0xFB,0x1A,0x23,0x37,0x9A
,0x7D,0x20,0x95,0xCA,0x47,0xC2,0xDA,0xE9,0xE8,0xFE,0x30,0x4C,0xA0,0xFE,0x4F,0x6E
,0xA0,0xA5,0x81,0x45,0xBA,0xAF,0x68,0xEE,0x60,0xA1,0xD5,0x00,0xA8,0xDC,0xCC,0x80
,0x84,0x0C,0x19,0xCF,0x81,0xB9,0x13,0xC0,0x13,0x07,0xE8,0x70,0x05,0x79,0x15,0xF5
,0xD5,0x2B,0x05,0xA1,0xDD,0x34,0xD8,0xD9,0xC3,0xE7,0x05,0x70,0x05,0x79,0x15,0xF5
,0xD5,0x2B,0x05,0xA1,0xDD,0x34,0xD8,0xD9,0xC3,0xE7,0x05,0x70,0x05,0x79,0x15,0xF5
,0xD5,0x2B,0x05,0xA1,0xDD,0x34,0xD8,0xD9,0xC3,0xE7,0x05,0x10,0x3A,0xCC,0x2F,0x13
,0xE1,0xE1,0x8C,0x7B,0xC9,0xC5,0x48,0xB3,0x85,0x73,0x55,0x87,0xEE,0x99,0x14,0x67
,0xB2,0x1B,0x01,0x1B,0x56,0x01,0x2F,0xFB,0x47,0x07,0x88,0xBD,0x4C,0xD2,0x1A,0x08
,0x14,0x42,0xF3,0xF5,0xC2,0x7C,0x26,0x9E,0x24,0x00,0xA4,0xEA,0x5F,0x20,0xFC,0xCA
,0x80,0xF6,0x9B,0xC9,0x28,0x5B,0x55,0x22,0x94,0x33,0x4F,0x3E,0x1B,0xC6,0x31,0x23
,0x82,0xB1,0x97,0x3E,0xC1,0x00,0x2F,0xEF,0xCE,0x06,0x7B,0xAA,0xCD,0xA6,0x61,0xF5
,0xC9,0x59,0x8E,0xDB,0xF6,0x49,0x73,0x9C,0xB9,0x08,0x05,0xC3,0x1E,0xEB,0xA6,0xD3
,0x0F,0xBB,0x86,0xFD,0xFC,0xCC,0x99,0x89,0x61,0xA9,0xB1,0xF9,0x30,0xC7,0x48,0xB1
,0x79,0x6C,0x75,0x26,0x8C,0xF5,0x46,0xF4,0x7F,0x04,0xED,0xD1,0x2B,0x16,0x2D,0x94
,0x2F,0x2C,0xDE,0x6E,0x7B,0x97,0xE7,0x28,0x8B,0xDA,0x0D};//Encrypt data
unsigned char out[4096];
int main(int argc, char *argv[])
{
   
      MD5_CTX c;
      AES_KEY aes_key;
      int i,j;

      MD5Init(&c);
      Transform((unsigned long *)c.buf,(unsigned long*)thunder);
      strncpy((char*)&thunder_AES_key,(const char*)&c.buf,16);

      AES_set_decrypt_key((const unsigned char *)&thunder_AES_key,128,&aes_key);
      for ( i=0;i       {
          AES_decrypt((const unsigned char *)&in[i*16],(unsigned char *)&out[i*16],&aes_key);
      }
     
      for ( i=0;i       {
          for ( j=0;j<16;j++)
          {
              printf("%02x ",out[i*16+j]);
          }
          printf("     ");
          for ( j=0;j<16;j++)
          {
              printf("%c",out[i*16+j]);
          }
          printf("\n");
      }
     return 0;
}


http://hi.baidu.com/vessial/blog/item/c7791654b2a19b1a3b29352f.html
文件:mutidown.sh.tar.gz
大小:5KB
下载:下载
阅读(8044) | 评论(12) | 转发(0) |
0

上一篇:断开其他用户的SSH链接

下一篇:iwconfig

给主人留下些什么吧!~~

chinaunix网友2009-08-24 17:10:12

怎么不行,你用的是fedora还是DEBIAN、ubantu、等其他的LINUX以及具体版本号是多少,以及注意事项,盼回复。谢谢

chinaunix网友2009-07-24 15:38:42

你还在找空间?这里有免费的空间申请,还赠送二级域名!! 福娃免费空间申请地址:http://h.8wa.com

chinaunix网友2009-07-20 14:48:42

.EVDO设置 1.把UIM卡的PRL版本升级到00005。 把卡放到非智能机上(比如华为7100)发短信PRL至10659165,(133,153号码发送PRL到165)收到4条确认短信就OK了(注意,最后一条的内容应该 是说升级成功)。 2.把机器的radio升级到3.42.30以上不带U的版本,我用的是3.42.50。 以上2步完成后就可以在手机上看到 EV 了。 3.在营业系统中为自己的号码申请EVDO业务,很快的几分钟就工单竣工了。 4.在手机电话拨号盘输入##778#,选择EDIT,输入密码(一般为000000),进入EDIT模式,则可进入手机配置的工程模式: A. 点击在屏幕的左下角“View info”,在出现的菜单中选择“Modem Settings”,修改“Preferred Mode”为auto,HDR Hybrid Preferred 必须 设为 Enable,代表使用1X+EVDO混合模式,EVDO优选。 B. 点击左下角View info键出现下拉菜单,选择CDMA Settings项点击进入。用笔点击A-Sys Pr

chinaunix网友2009-07-19 22:01:00

ding

chinaunix网友2009-07-19 10:18:01

支持 楼主