首页 » 网络 » 奇艺分析

奇艺的域名与各种Server

使用curl随便获取奇艺一个网页,看到是nginx服务器。

$ curl http://www.qiyi.com/dianying/ -I
Server: nginx/ 

还不知道操作系统。用nmap扫描

$ nmap qiyi.com -A -n -T 3  
Warning: Hostname qiyi.com resolves to 8 IPs. Using 202.108.14.56.

nmap报告奇艺DNS解析出来有8个IP,用dig查询详情

qiyi.com.               900     IN      A       202.108.14.56       # 北京 联通
qiyi.com.               900     IN      A       220.181.73.5        # 北京 电信
qiyi.com.               900     IN      A       220.181.73.6
qiyi.com.               900     IN      A       220.181.115.55      # 北京 电信
qiyi.com.               900     IN      A       220.181.115.56
qiyi.com.               900     IN      A       202.108.14.15       # 北京 联通
qiyi.com.               900     IN      A       202.108.14.16
qiyi.com.               900     IN      A       202.108.14.55

8个IP都获得了。在通过ip138查看这些IP所在地,分别注释在dig输出的后面了。都是北京,电信联调基本对半,联通稍多。再用http://ping.chinaz.com/ 测试各地ping qiyi.com。

iplocation.geo.qiyi.com,看似用于检测IP地理信息,应该用于精准广告、用户统计,以及本地化之用(类似显示:欢迎xx用户,现在时间是xx:xx等)。

iplocation.geo.qiyi.com. 33     IN      A       202.108.14.134
iplocation.geo.qiyi.com. 33     IN      A       220.181.74.35

show.cupid.qiyi.com。cupid原意是爱神,猜测是跟踪每个独立用户信息。例如观看记录;或用于精准广告;或推荐系统,采集数据。

track.cupid.qiyi.com.   694     IN      CNAME   show.cupid.qiyi.com.
show.cupid.qiyi.com.    631     IN      A       202.108.14.203
show.cupid.qiyi.com.    631     IN      A       202.108.14.204
show.cupid.qiyi.com.    631     IN      A       220.181.74.24
show.cupid.qiyi.com.    631     IN      A       220.181.74.25

rec.inter.qiyi.com。看似统计服务器之类。

rec.inter.qiyi.com.     333     IN      A       202.108.14.203
rec.inter.qiyi.com.     333     IN      A       202.108.14.204

video.qiyi.com

data.video.qiyi.com

$ dig data.video.qiyi.com
data.video.qiyi.com.    97      IN      A       220.181.115.82
data.video.qiyi.com.    97      IN      A       202.108.14.17
data.video.qiyi.com.    97      IN      A       202.108.14.82
data.video.qiyi.com.    97      IN      A       202.108.14.117
data.video.qiyi.com.    97      IN      A       220.181.115.17

uuid.video.qiyi.com

uuid.video.qiyi.com.    426     IN      CNAME   data.video.qiyi.com.

cache.video.qiyi.com

cache.video.qiyi.com.   139     IN      A       220.181.115.81
cache.video.qiyi.com.   139     IN      A       220.181.110.44
cache.video.qiyi.com.   139     IN      A       220.181.115.29

msg.video.qiyi.com

msg.video.qiyi.com.     400     IN      A       220.181.110.80
msg.video.qiyi.com.     400     IN      A       202.108.14.19
msg.video.qiyi.com.     400     IN      A       202.108.14.76
msg.video.qiyi.com.     400     IN      A       220.181.74.76

uestat.video.qiyi.com即msg.video.qiyi.com

uestat.video.qiyi.com.  900     IN      CNAME   msg.video.qiyi.com.

jsmsg.video.qiyi.com

jsmsg.video.qiyi.com.   900     IN      A       202.108.14.184

meta.video.qiyi.com

meta.video.qiyi.com.    372     IN      A       202.108.14.56
meta.video.qiyi.com.    372     IN      A       202.108.14.96
meta.video.qiyi.com.    372     IN      A       202.108.14.97
meta.video.qiyi.com.    372     IN      A       202.108.14.98
meta.video.qiyi.com.    372     IN      A       220.181.73.5
meta.video.qiyi.com.    372     IN      A       220.181.73.6
meta.video.qiyi.com.    372     IN      A       220.181.115.55
meta.video.qiyi.com.    372     IN      A       220.181.115.56
meta.video.qiyi.com.    372     IN      A       202.108.14.15
meta.video.qiyi.com.    372     IN      A       202.108.14.16
meta.video.qiyi.com.    372     IN      A       202.108.14.55

score.video.qiyi.com

score.video.qiyi.com.   774     IN      A       202.108.14.22
score.video.qiyi.com.   774     IN      A       202.108.14.34

dispatcher.video.qiyi.com

dispatcher.video.qiyi.com. 893  IN      A       220.181.74.33
dispatcher.video.qiyi.com. 893  IN      A       202.108.14.40

图片服务器

qiyipic.com.qiyi.com。有picN.qiyipic.com等别名。

qiyipic.com.qiyi.com.   96      IN      A       202.108.14.58
qiyipic.com.qiyi.com.   96      IN      A       202.108.14.59
qiyipic.com.qiyi.com.   96      IN      A       220.181.115.57
qiyipic.com.qiyi.com.   96      IN      A       220.181.115.58
qiyipic.com.qiyi.com.   96      IN      A       220.181.115.59
qiyipic.com.qiyi.com.   96      IN      A       220.181.115.155
qiyipic.com.qiyi.com.   96      IN      A       220.181.115.156
qiyipic.com.qiyi.com.   96      IN      A       220.181.115.157
qiyipic.com.qiyi.com.   96      IN      A       117.34.9.158
qiyipic.com.qiyi.com.   96      IN      A       117.34.9.159
qiyipic.com.qiyi.com.   96      IN      A       123.125.117.15
qiyipic.com.qiyi.com.   96      IN      A       123.125.117.16
qiyipic.com.qiyi.com.   96      IN      A       123.125.117.17

奇艺播放

以《唐山大地震》测试

测试:唐山大地震

GET /p2p/09e44c7989e6581b598ee9ffb33c4bb1.f4v HTTP/1.1
Accept: */*
Accept-Language: zh-CN
User-Agent: Mozilla/4.0 
Host: cache.video.qiyi.com
Connection: Keep-Alive

HTTP/1.1 200 OK
Server: nginx/0.8.34
Date: Wed, 04 May 2011 10:08:39 GMT
Content-Type: text/html
Content-Length: 703
Connection: keep-alive

Content包括:

{"encodeDate":"20101021","md5String":"9ace04d3920a438883dab2d6b4b849be3c24cead7cc68ed60dd0690e7fca2d70ba27fa1a7e4ebf6009c5bc65e70be25e6f473a8d8d50cc56e6f55b4fdf585b0426517c167e436c5d7ce2137baa0c9749e54bf81c4640a98da2c2466a406aef4a4c03113c605dc956fb4d54e88408b571e6b20b8111bd1468da91b62e740bafded7d2eddece0332e4164957e2d0bcab11cd35d96b96d2434c5848f764f72807c3cad4a24c3b5288444e8ffc7878feca01997752424347538ee7366752a24b9ddb","totalSection":"23","codeStream":517176,"videoName":"...............","videoType":"movie","version":1,"duration":363,"sectionNum":3,"fileLength":23466857,"videoId":"15be7f24fe8511dfaa6aa4badb2c35a1","fileName":"09e44c7989e6581b598ee9ffb33c4bb1.f4v","codeRate":2,"flvHeader":2017}

分析

  • cache.video.qiyi.com: 202.108.14.29 (北京联通)
  • filename: len 32bytes(md5)
  • filelen: 23466857(22MB)
  • totalSection: 23 (23个分段, 按平均分段大小22MB计算,文件大小为:506MB)
  • sectionNum: 3 (第3个分段)
  • duration: 363 (分段时长,按平均分段时长363计算,视频长度为: 139分钟)
GET /p2p/feb3b81146eae58423c812e629930125.f4v HTTP/1.1
Accept: */*
Accept-Language: zh-CN
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: cache.video.qiyi.com
Connection: Keep-Alive

HTTP/1.1 200 OK
Server: nginx/0.8.34
Date: Wed, 04 May 2011 10:20:59 GMT
Content-Type: text/html
Content-Length: 831
Connection: keep-alive

Content内容是:

{"encodeDate":"20101021","md5String":"1308d0e9dd89822115190d66b865fb1994fa12af9f0649887a85ce5ea2016ba1db23d2aab3bcc44b14ea1395ec43dd555f97b19a50581e0e7c5e5f7de8fa9b2ed3f26a934c9cb32c2b68e5cb5c91a96b3e07f93cdf43eae33a92a8d83cc70baf5a4ef140710dbc8f9d150ab96d7066b632567ffe0230f1e58dca131e4b10566fb60224424ac0dc6075c43af920d263dae3bdc7865373ec5eb46ef303fe86b8becc2ba35fcb8323d281fab131e172a663f0922583f82fc4d7cce97a7e66bd806b1ff4aee1de444eeaa0004b81ae6d32a133b57c2a73b4bace5ca17160e06509dac4185c78e2ae87794509d5b130b222c1222b7b54404aa86177ef77490a7284fa","totalSection":"23","codeStream":733894,"videoName":"...............","videoType":"movie","version":1,"duration":361,"sectionNum":5,"fileLength":33116959,"videoId":"15be7f24fe8511dfaa6aa4badb2c35a1","fileName":"feb3b81146eae58423c812e629930125.f4v","codeRate":2,"flvHeader":1801}

分析

  • 第3分段文件名:/p2p/09e44c7989e6581b598ee9ffb33c4bb1.f4v
  • 第5分段文件名:/p2p/feb3b81146eae58423c812e629930125.f4v
  • 真正的文件名:15be7f24fe8511dfaa6aa4badb2c35a1 (即videoId字段)
  • 请求地址: /videos/movie/encodeDate/fileName.f4v?v=VER (encodeDate, fileName从服务器返回信息中获取)
GET /videos/movie/20101021/feb3b81146eae58423c812e629930125.f4v?v=3689485132 HTTP/1.1
Accept: */*
Accept-Language: zh-CN
User-Agent: Mozilla/4.0 
Host: p2sdata.video.qiyi.com
Connection: Keep-Alive

HTTP/1.1 200 OK
Server: nginx/
Date: Wed, 04 May 2011 10:21:00 GMT
Content-Type: text/html
Content-Length: 173
Connection: keep-alive
Cache-Control: no-cache

Content内容:

{"l":"http://123.125.118.43/videos/movie/20101021/feb3b81146eae58423c812e629930125.f4v?key=f90991fadf4a22c5&v=3689485132","t":"CNC|BeiJing-61.135.165.165","z":"beijing_cnc"}>

分析

  • key=f90991fadf4a22c5 (这里返回的key,将在之后的请求中使用)
  • beijing_cnc(返回了客户端的ISP信息)
  • 61.135.165.165(反弹了客户端的IP信息)
GET /videos/movie/20101021/feb3b81146eae58423c812e629930125.f4v?key=f90991fadf4a22c5&v=3689485132 HTTP/1.1
Accept: */*
Accept-Language: zh-CN
Referer: http://www.qiyi.com/player/20100519143520/qiyi_player.swf
x-flash-version: 10,0,45,2
Accept-Encoding: gzip, deflate
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QIYI P2S)
Connection: Keep-Alive
Host: 123.125.118.43
Range: bytes=0-360447

HTTP/1.1 206 Partial Content
Server: nginx/0.8.48
Date: Wed, 04 May 2011 10:21:01 GMT
Content-Type: application/octet-stream
Content-Length: 360448
Last-Modified: Sun, 01 May 2011 02:11:26 GMT
Connection: keep-alive
Content-Range: bytes 0-360447/33116959

分析

  • 一次获取的数据大小约为340KB,也就是需要约92次HTTP请求。
  • Content-Range: bytes 0-360447/33116959 (分段总长度为:33116959, 此次获取的range:0-360447)

分享

0