某果TV视频网站-逆向分析

解析目标:https://www.mgtv.com/b/331440/7477397.html

1.PC网页端抓包

Screenshot_1580386488

类型:Script,Initiator(发起者):

https://s1.hitv.com/libs/??vplayer/6.5.2/vplayer.min.js

Screenshot_1580387948

e.getSource函数调用

Screenshot_1580386949

解析视频链接的接口:

https://pcweb.api.mgtv.com/player/getSource

提交方式Get,提交参数如下

NameValue分析
_support10000000应该是固定值,暂时忽略
tk20UjM2gzMwgTNx0Ddpx2Y8FDMzAjLz4C需要找到算法或者找到提供该值的接口
pm214LiO9rBdOiWzd0AhY4IEIXqaFKFDcPSqf需要找到算法或者找到提供该值的接口
video_id7477397视频id,由视频链接可获得
typepch5应该是固定值,暂时忽略
callbackjsonp_1580386254720_25583可有可无,有则在返回的json数据用"jsonp_1580386254720_25583()"包住

Cookie:

NameValue
__guid24428860.2761247738319087600.1580025714119.5637
__random_seed0.5245024189692014
MQGUID1221342208167497728
__MQGUID1221342208167497728
PLANB_FREQUENCYXi1HdP4bzVY5lNmQ
PM_CHKID67f528e44508f6aa
mba_deviceidb4d810ad-0dac-cc3a-50f5-5fc602c38d7e
__gadsID=ec7077b65bd1b86e:T=1580025718:S=ALNI_Mb0oPzUJykfxPlDBJ0zT9jsEwiACA
id6627057
rndrnd
seqidboo5ihau3du5r98unmlg
uuidd5d8c8f64fa14018a9c5b6b7921023cb
loginAccount16675914159
vipStatus1
wei95a69cea65a554c1be638bcd3426bdc7
wei266d0P1OWbEWYMxguJ9Kq9p4Xa78sXgZnRvR8pN%2BkMpVr1QcfIppMiYHkZ6qHlXOvCGtJXHpeV45f2I3DOsVmDd5PrMA9csREzlhtLYKHA4IM%2Bv%2BmCGRGGuFY3SA2XvPxV9kp5PpTjciocDXjTBOca9qeWt%2FrRoMdFobRZjIS4lWZ6sW66eGswipU7iFMU5zmegZhwB63Qrk
HDCNBOO5IGSR1Q1IE5GHN160-118851676
__STKUUID20ef907b-f7a0-454a-a3af-f548f8e3a5b0
pc_v6v6
monitor_count1
sessionid1580354708471
beta_timer1580354711575
lastActionTime1580354711752

逆向思路:

  1. 获得tk2pm2
  2. 解析视频的请求是由vplayer.min.jse.getSource函数发出的,tk2pm2应该可在js文件内的e.getSource函数获得

1.查看vplayer.min.jse.getSource函数

e.getSource部分函数

        e.getSource = function(t, e) {
            var i = this,
            n = Hr(this.vm._config),
            o = n.tk2,
            r = n.type,
            s = Vr.GETSOURCE_TIMEOUT[this.getSourceRetry],
            a = Vr.GETSOURCE_RETRY_DOMAINS[this.getSourceRetry] + "/player/getSource?" + vt({
                _support: "10000000",
                tk2: o,
                pm2: e,
                video_id: t,
                type: r
            });
参数分析
_support固定为:10000000
tk2来源于Hr函数内的tk2变量
pm2来源于e变量
video_id可以通过视频链接获取,不理会
type来源于Hr函数内的type变量

下一步思路:

  1. 找到Hr函数内的tk2和type变量
  2. 找到e (pm2)变量

Hr函数:

    Hr = function(t) {
        var e = zr ? "1121": "1030",
        i = zr ? "pad": "pch5",
        n = (t || 0).lobparam || {},
        o = n.did,
        r = void 0 === o ? "": o,
        s = n.suuid,
        a = void 0 === s ? "": s,
        c = n.cxid,
        l = void 0 === c ? "": c,
        h = ~~ ( + new Date / 1e3);
        return {
            did: r,
            suuid: a,
            cxid: l,
            type: i,
            pno: e,
            tk2: btoa("did=" + r + "|pno=" + e + "|ver=0.3.0301|clit=" + h).replace(/\+/g, "_").replace(/\//g, "~").replace(/=/g, "-").split("").reverse().join(""),
            timestamp: h
        }
    }
type = zr ? "pad": "pch5"

三元表达式,变量zr为truetype="pad"否则type="pch5"

通过搜索,搜索到zr为:

zr = /iPad/i.test(navigator.userAgent),
//判断UA是否为iPad,是则返回"true",否则返回"false"
//因为我们是在PC网页端抓的包,所以type固定为"pch5"
//test()方法
/*定义和用法:
test() 方法用于检测一个字符串是否匹配某个模式.
如果字符串中有匹配的值返回 true ,否则返回 false。*/
/*语法:
大字符串.test(小字符串)*/
/*实例:
Javascript 判断是移动端浏览器还是 PC 端浏览器:*/

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
    document.write("移动")
} else {
    document.write("PC")
}

tk2算法:

btoa("did=" + r + "|pno=" + e + "|ver=0.3.0301|clit=" + h).replace(/\+/g, "_").replace(/\//g, "~").replace(/=/g, "-").split("").reverse().join(""),

算法分析:

1.btoa("did=" + r + "|pno=" + e + "|ver=0.3.0301|clit=" + h)

Base64编码("did=" + r + "|pno=" + e + "|ver=0.3.0301|clit=" + h)

var string = 'Hello World!';
//Base64编码
var encodedString = btoa(string);
console.log(encodedString); // Outputs: "SGVsbG8gV29ybGQh"
//Base64解码
var decodedString = atob(encodedString);
console.log(decodedString); // Outputs: "Hello World!"
需要的参数代码分析
r (did)void 0 === o ? "": o,
"void 0 === o" : 判断变量o是否未定义
三元表达式:若变量o未定义则r="",否则r=n.did
**根据多次抓包分析did为固定值"20ef907b-f7a0-454a-a3af-f548f8e3a5b0"
所以无需在js内再找did,太麻烦了**
e (pno)var e = zr ? "1121": "1030",
同上"type",判断UA是否为iPad,是则返回"true",否则返回"false"
//因为我们是在PC网页端抓的包,所以e (pno)固定为"1030"
h (clit)h = ~~ ( + new Date / 1e3);
//JavaScript中可以在某个元素前使用 ‘+’ 号,这个操作是将该元素转换成Number类型,如果转换失败,那么将得到 NaN。
"+ new Date"创建一个时间对象,用"+"把时间格式设置为13位的时间戳
"/ 1e3" 将13位时间戳除以10的三次方
"~~" 取整
h (clit)其实就是一个10位的时间戳

修饰符有三种:i, g, m,可以同时出现,没有顺序(即 gi 与 ig 一样),请参考下方说明

修饰符说明
i忽略大小写匹配
g全局匹配,即是匹配一个后继续匹配,直到结束
m多行匹配,即是遇到换行后不停止匹配,直到结束
.replace(/+/g, "_")/+/g :全局匹配"+"
把全局的"+"替换为"_"
.replace(///g, "~")///g : 全局匹配"/"
把全局的"/"替换为"~"
.replace(/=/g, "-")/=/g : 全局匹配"="
把全局的"="替换为"-"

.split("")

分割每个字符,把字符串转换为数组

split() 方法用于把一个字符串分割成字符串数组。

提示: 如果把空字符串 ("") 用作 separator,那么 stringObject 中的每个字符之间都会被分割。

注意: split() 方法不改变原始字符串。
实例
把一个字符串分割成字符串数组:
var str="How are you doing today?";
var n=str.split(" ");
n 输出一个数组的值:
How,are,you,doing,today?

.reverse()

颠倒数组元素的顺序

定义和用法
reverse() 方法用于颠倒数组中元素的顺序。
实例
颠倒数组中元素的顺序:
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.reverse();
fruits 结果输出:
Mango,Apple,Orange,Banana

.join("")

把数组转为字符串

定义和用法
join() 方法用于把数组中的所有元素转换一个字符串。

元素是通过指定的分隔符进行分隔的。
实例
把数组中的所有元素转换为一个字符串:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var energy = fruits.join();
energy输出结果:

Banana,Orange,Apple,Mango

实例
使用不同的分隔符:

var fruits = ["Banana", "Orange", "Apple", "Mango"];
var energy = fruits.join(" and ");
energy 结果输出:

Banana and Orange and Apple and Mango

∴tk2的算法步骤如下

  1. 将"did=$did|pno=1030|ver=0.3.0301|clit=10位时间戳"进行Base64编码
  2. 把所有的"+"替换为"_"
  3. 把所有的"/"替换为"~"
  4. 把所有的"="替换为"-"
  5. 将字符串顺序颠倒

逆向思路:

  1. 解析视频需要提交的参数只差"pm2"没有确定了,找到算法或者找到提供该值的接口就能获得该参数
  2. 解析视频的请求是由vplayer.min.jse.getSource函数发出的,pm2应该可在js文件内的e.getSource函数获得

顺藤摸瓜,一路摸上去发现js文件中"pm2"对应的值是个俄罗斯套娃,一个套一个,js代码不太熟悉,暂时放弃在js文件内找,先去抓包的数据里面找一下有没有获得"pm2"的接口

image-20200131155125862

类型:Script,Initiator(发起者)还是上面提到的vplayer.min.js内的e.getCMSData函数

image-20200131155513993

解析视频链接的接口:

https://pcweb.api.mgtv.com/player/video

提交方式Get,提交参数如下:

NameValue分析
did20ef907b-f7a0-454a-a3af-f548f8e3a5b0根据多次抓包数据,判断为固定值
suuid039d19e7-74cf-43c8-897d-587da6003f83根据多次抓包数据,判断为非固定值
cxid 空值,不理会
tk2wADM3UDNwgTNx0Ddpx2Y8FDMzAjLz4CM9IXZ2x上面已经得到了tk2的算法,不理会
video_id7477397可以通过视频链接获取,不理会
typepch5根据js文件可知为固定值
_support10000000根据js文件可知为固定值
auth_mode1根据多次抓包数据,判断为固定值
callbackjsonp_1580457000644_25304可有可无,有则在返回的json数据用"jsonp_1580457000644_25304()"包住

返回json:

jsonp_1580518683796_96705({"msg":"","code":200,"data":{"atc":{"pm2":"LERtlIyVkBXre4er_aShwOsDAA25hVFcqNMpB7IExD77iDjzXUSm3zVKcYBf9SnEiGvn4rSSNEiAVRt1NG6W8CaoKoxB6qJ_PZftA8~9o0E2VN8RHWeQAnh16SSZMNXpugBe61WTZXixBWZtmaD7d2IPsn5yKgIGPrCALTaT0hPJC5Eb6D2~VDvhuizqVcWWqIahGVqwlQFw6saFMWfIDMGbwMukZ68WtC0YN9sCw~KadWqnM5tNDU4a5GtpO07N9njGSVhZz_6pmVzyocDvX2tQBHKwTO0sPJ2W4gHPbm8-","tk2":"--AM9QHbix3M2gDOxUDM4UTM9wWY2x3N5MzN3QzN9QWa2xHM9YXZyB3cpxXM9kXYwNXa8FTPwlmd"},"share":{"qq":"http://connect.qq.com/widget/shareqq/index.html?title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E5%AE%A0%E7%88%B1%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E&desc=%E5%9C%A8%E8%8A%92%E6%9E%9CTV%E4%B8%8A%E7%9C%8B%E8%A7%81%E8%BF%99%E6%9D%A1%E8%A7%86%E9%A2%91%E8%BF%98%E4%B8%8D%E9%94%99%E5%93%A6%EF%BC%9A%E5%AE%A0%E7%88%B1&site=%E8%8A%92%E6%9E%9CTV&url=http://www.mgtv.com/s/7477397.html%3Fdc%3D1dad8ef5-0c8b-4c98-a243-222d3d82fd02%26cxid%3D90fe36tp1&tpa=dW5pb25faWQ9MTAzMjUyXzEwMDAwMV8wMV8wMQ","weixin":"https://www.mgtv.com/share/weixin/?url=http://www.mgtv.com/s/7477397.html%3Fdc%3D9286158a-5de4-4c94-aa0b-49cbd6a4d706&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E5%AE%A0%E7%88%B1%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E","weibo":"http://service.weibo.com/share/share.php?appkey=152400019&url=http://www.mgtv.com/s/7477397.html%3Fdc%3D8110aa8d-4b25-428d-9819-9eec7822c80d%26cxid%3D94f9tkogo&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E5%AE%A0%E7%88%B1%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E&content=utf-8&pic=https://0img.hitv.com/preview/sp_images/2020/1/27/dianying/331440/7477397/20200127235537405.jpg","qzone":"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http://www.mgtv.com/s/7477397.html%3Fdc%3Dad129031-a029-406e-8f4b-722be2cfd141%26cxid%3D90fe36tp1&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E5%AE%A0%E7%88%B1%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E","dc":"dc22ee9b-9895-48da-9aca-267d8549e34e"},"user":{"uid":"6627057","ticket":"","iplimit":"0","ip":"14.210.26.1","nickname":"mg39941278kFdk","login":true,"purview":"200","uuid":"d5d8c8f64fa14018a9c5b6b7921023cb","mac":"20ef907b-f7a0-454a-a3af-f548f8e3a5b0","cxid":"1580518655620","isvip":"1"},"stream_quality":{"default_quality_force":"-999","default_quality":"-999"},"drm":{"drmFirm":"","drmType":"","licenseUrl":""},"frame":{"images":["https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_1.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_2.jpg","https://1img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_3.jpg","https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_4.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_5.jpg","https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_6.jpg","https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_7.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_8.jpg","https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_9.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_10.jpg","https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_11.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_12.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_13.jpg"],"imgSize":"178*100","second":["0|4|9|14|19|24|29|34|39|44|49|54|59|64|69|74|79|84|89|94|99|104|109|114|119|124|129|134|139|144|149|154|159|164|169|174|179|184|189|194|199|204|209|214|219|224|229|234|239|244|249|254|259|264|269|274|279|284|289|294|299|304|309|314|319|324|329|334|339|344|349|354|359|364|369|374|379|384|389|394|399|404|409|414|419|424|429|434|439|444|449|454|459|464|469|474|479|484|489|494","499|504|509|514|519|524|529|534|539|544|549|554|559|564|569|574|579|584|589|594|599|604|609|614|619|624|629|634|639|644|649|654|659|664|669|674|679|684|689|694|699|704|709|714|719|724|729|734|739|744|749|754|759|764|769|774|779|784|789|794|799|804|809|814|819|824|829|834|839|844|849|854|859|864|869|874|879|884|889|894|899|904|909|914|919|924|929|934|939|944|949|954|959|964|969|974|979|984|989|994","999|1004|1009|1014|1019|1024|1029|1034|1039|1044|1049|1054|1059|1064|1069|1074|1079|1084|1089|1094|1099|1104|1109|1114|1119|1124|1129|1134|1139|1144|1149|1154|1159|1164|1169|1174|1179|1184|1189|1194|1199|1204|1209|1214|1219|1224|1229|1234|1239|1244|1249|1254|1259|1264|1269|1274|1279|1284|1289|1294|1299|1304|1309|1314|1319|1324|1329|1334|1339|1344|1349|1354|1359|1364|1369|1374|1379|1384|1389|1394|1399|1404|1409|1414|1419|1424|1429|1434|1439|1444|1449|1454|1459|1464|1469|1474|1479|1484|1489|1494","1499|1504|1509|1514|1519|1524|1529|1534|1539|1544|1549|1554|1559|1564|1569|1574|1579|1584|1589|1594|1599|1604|1609|1614|1619|1624|1629|1634|1639|1644|1649|1654|1659|1664|1669|1674|1679|1684|1689|1694|1699|1704|1709|1714|1719|1724|1729|1734|1739|1744|1749|1754|1759|1764|1769|1774|1779|1784|1789|1794|1799|1804|1809|1814|1819|1824|1829|1834|1839|1844|1849|1854|1859|1864|1869|1874|1879|1884|1889|1894|1899|1904|1909|1914|1919|1924|1929|1934|1939|1944|1949|1954|1959|1964|1969|1974|1979|1984|1989|1994","1999|2004|2009|2014|2019|2024|2029|2034|2039|2044|2049|2054|2059|2064|2069|2074|2079|2084|2089|2094|2099|2104|2109|2114|2119|2124|2129|2134|2139|2144|2149|2154|2159|2164|2169|2174|2179|2184|2189|2194|2199|2204|2209|2214|2219|2224|2229|2234|2239|2244|2249|2254|2259|2264|2269|2274|2279|2284|2289|2294|2299|2304|2309|2314|2319|2324|2329|2334|2339|2344|2349|2354|2359|2364|2369|2374|2379|2384|2389|2394|2399|2404|2409|2414|2419|2424|2429|2434|2439|2444|2449|2454|2459|2464|2469|2474|2479|2484|2489|2494","2499|2504|2509|2514|2519|2524|2529|2534|2539|2544|2549|2554|2559|2564|2569|2574|2579|2584|2589|2594|2599|2604|2609|2614|2619|2624|2629|2634|2639|2644|2649|2654|2659|2664|2669|2674|2679|2684|2689|2694|2699|2704|2709|2714|2719|2724|2729|2734|2739|2744|2749|2754|2759|2764|2769|2774|2779|2784|2789|2794|2799|2804|2809|2814|2819|2824|2829|2834|2839|2844|2849|2854|2859|2864|2869|2874|2879|2884|2889|2894|2899|2904|2909|2914|2919|2924|2929|2934|2939|2944|2949|2954|2959|2964|2969|2974|2979|2984|2989|2994","2999|3004|3009|3014|3019|3024|3029|3034|3039|3044|3049|3054|3059|3064|3069|3074|3079|3084|3089|3094|3099|3104|3109|3114|3119|3124|3129|3134|3139|3144|3149|3154|3159|3164|3169|3174|3179|3184|3189|3194|3199|3204|3209|3214|3219|3224|3229|3234|3239|3244|3249|3254|3259|3264|3269|3274|3279|3284|3289|3294|3299|3304|3309|3314|3319|3324|3329|3334|3339|3344|3349|3354|3359|3364|3369|3374|3379|3384|3389|3394|3399|3404|3409|3414|3419|3424|3429|3434|3439|3444|3449|3454|3459|3464|3469|3474|3479|3484|3489|3494","3499|3504|3509|3514|3519|3524|3529|3534|3539|3544|3549|3554|3559|3564|3569|3574|3579|3584|3589|3594|3599|3604|3609|3614|3619|3624|3629|3634|3639|3644|3649|3654|3659|3664|3669|3674|3679|3684|3689|3694|3699|3704|3709|3714|3719|3724|3729|3734|3739|3744|3749|3754|3759|3764|3769|3774|3779|3784|3789|3794|3799|3804|3809|3814|3819|3824|3829|3834|3839|3844|3849|3854|3859|3864|3869|3874|3879|3884|3889|3894|3899|3904|3909|3914|3919|3924|3929|3934|3939|3944|3949|3954|3959|3964|3969|3974|3979|3984|3989|3994","3999|4004|4009|4014|4019|4024|4029|4034|4039|4044|4049|4054|4059|4064|4069|4074|4079|4084|4089|4094|4099|4104|4109|4114|4119|4124|4129|4134|4139|4144|4149|4154|4159|4164|4169|4174|4179|4184|4189|4194|4199|4204|4209|4214|4219|4224|4229|4234|4239|4244|4249|4254|4259|4264|4269|4274|4279|4284|4289|4294|4299|4304|4309|4314|4319|4324|4329|4334|4339|4344|4349|4354|4359|4364|4369|4374|4379|4384|4389|4394|4399|4404|4409|4414|4419|4424|4429|4434|4439|4444|4449|4454|4459|4464|4469|4474|4479|4484|4489|4494","4499|4504|4509|4514|4519|4524|4529|4534|4539|4544|4549|4554|4559|4564|4569|4574|4579|4584|4589|4594|4599|4604|4609|4614|4619|4624|4629|4634|4639|4644|4649|4654|4659|4664|4669|4674|4679|4684|4689|4694|4699|4704|4709|4714|4719|4724|4729|4734|4739|4744|4749|4754|4759|4764|4769|4774|4779|4784|4789|4794|4799|4804|4809|4814|4819|4824|4829|4834|4839|4844|4849|4854|4859|4864|4869|4874|4879|4884|4889|4894|4899|4904|4909|4914|4919|4924|4929|4934|4939|4944|4949|4954|4959|4964|4969|4974|4979|4984|4989|4994","4999|5004|5009|5014|5019|5024|5029|5034|5039|5044|5049|5054|5059|5064|5069|5074|5079|5084|5089|5094|5099|5104|5109|5114|5119|5124|5129|5134|5139|5144|5149|5154|5159|5164|5169|5174|5179|5184|5189|5194|5199|5204|5209|5214|5219|5224|5229|5234|5239|5244|5249|5254|5259|5264|5269|5274|5279|5284|5289|5294|5299|5304|5309|5314|5319|5324|5329|5334|5339|5344|5349|5354|5359|5364|5369|5374|5379|5384|5389|5394|5399|5404|5409|5414|5419|5424|5429|5434|5439|5444|5449|5454|5459|5464|5469|5474|5479|5484|5489|5494","5499|5504|5509|5514|5519|5524|5529|5534|5539|5544|5549|5554|5559|5564|5569|5574|5579|5584|5589|5594|5599|5604|5609|5614|5619|5624|5629|5634|5639|5644|5649|5654|5659|5664|5669|5674|5679|5684|5689|5694|5699|5704|5709|5714|5719|5724|5729|5734|5739|5744|5749|5754|5759|5764|5769|5774|5779|5784|5789|5794|5799|5804|5809|5814|5819|5824|5829|5834|5839|5844|5849|5854|5859|5864|5869|5874|5879|5884|5889|5894|5899|5904|5909|5914|5919|5924|5929|5934|5939|5944|5949|5954|5959|5964|5969|5974|5979|5984|5989|5994","5999|6004|6009|6014|6019|6024|6029|6034|6039|6044|6049|6054|6059|6064|6069|6074|6079|6084|6089|6094|6099|6104|6109|6114|6119|6124|6129|6134|6139|6144|6149|6154|6159|6164|6169|6174|6179|6184|6189|6194|6199|6204|6209|6214|6219|6224|6229|6234|6239|6244|6249|6254|6259|6264|6269|6274|6279|6284|6289|6294|6299|6304|6309|6314|6319|6324|6329|6334|6339|6344|6349|6354|6359|6364|6369|6374|6379|6384|6389|6394|6399|6404|6409|6414|6419|6424|6429|6434|6439|6444|6449|6454|6459|6464|6469"]},"points":{"start":"64|片头","end":"6190|片尾","content":[]},"info":{"authInfo":{"interests_info":{"play_tips":{"report":"https://vip.log.mgtv.com/dynamic_entry.html?source=vod_play&invoker=pcweb&version=1.4.1&did=20ef907b-f7a0-454a-a3af-f548f8e3a5b0&uuid=d5d8c8f64fa14018a9c5b6b7921023cb&vid=&cid=0&chnid=&plid=&plan_id=1052&exp=&creativity_id=1052&type=show","icon":"","text":"尊敬的V1会员,您正在观看VIP尊享内容"},"def_tips":{"suites":[{"entry_text":"尊敬的V1会员,正在为您切换VIP专享#def#画质","def":-1,"report":"https://vip.log.mgtv.com/dynamic_entry.html?source=vod_vip_defs&invoker=pcweb&version=1.4.1&did=20ef907b-f7a0-454a-a3af-f548f8e3a5b0&uuid=d5d8c8f64fa14018a9c5b6b7921023cb&vid=&cid=0&chnid=&plid=&plan_id=1051&exp=&creativity_id=1051&type=show","icon":"","finish_text":"尊敬的V1会员,已为您切换VIP专享#def#画质"},{"entry_text":"尊敬的V1会员,正在为您切换VIP专享#def#音质","def":5,"report":"https://vip.log.mgtv.com/dynamic_entry.html?source=vod_vip_defs&invoker=pcweb&version=1.4.1&did=20ef907b-f7a0-454a-a3af-f548f8e3a5b0&uuid=d5d8c8f64fa14018a9c5b6b7921023cb&vid=&cid=0&chnid=&plid=&plan_id=1051&exp=&creativity_id=1051&type=show","icon":"","finish_text":"尊敬的V1会员,已为您切换VIP专享#def#音质"}]}}},"buytips":"","clipLimit":1,"clip_type":"1","collection_id":"331440","collection_name":"","desc":"吴磊演绎人与宠物的暖心故事","drm":null,"drmFlag":"0","duration":"6473","keepPlay":null,"keepPlayType":0,"paymark":"1","playlist_id":"","playlist_name":"","price_novip":"","price_vip":"","root_id":"3","series":"第 1 集","series_id":"0","starPointFlag":"0","thumb":"https://0img.hitv.com/preview/sp_images/2020/1/27/dianying/331440/7477397/20200127235537405.jpg","tips":null,"title":"宠爱","trialtime":"300","url":"https://www.mgtv.com/s/7477397.html","video_id":"7477397","watchTime":0}},"seqid":"758ec0315f2b48e4b29f8460ab727472"})

逆向思路:

  1. 获得"pm2"的接口需要提交的参数里面,只有"suuid"不是很确定,这个"suuid"是个什么东西?
  2. 更换"video_id"和在不同时间测试当"suuid"固定为同一个值时,是否能正常返回json,若正常返回json就代表"suuid"的值可以固定下来

vplayer.min.js中可以看到"suuid"是播放流水,但是播放流水是个什么东西就不知道了

{
                title: "播放流水",
                prop: "suuid",
                cls: "",
                val: function() {
                    return t.vm._config.lobparam.suuid
                }
            },

测试目标:https://www.mgtv.com/b/327079/7466805.html

测试方式:在带有某果TV Vip账号Cookie的浏览器打开链接

返回json:

jsonp_1580518683796_96705({"msg":"","code":200,"data":{"atc":{"pm2":"CJtnwHsNL7uCKsihe8NZyFwT_xDZR__qtjheTm2JxdXFd9MncBWQTE~w9R2d4r4dSK_55xwe~ib1l_a6y5eWiJa~qfnB3UI_ZYllpwugWN7iSe3lW1eu57YRQ5Pbg6stDXV8BQFQnn~2b8mKubr6das~Nera24uBeFAfAltMYXjH1evEOVE1dLUrhVIYbDX2kBW~MEvoiQFAeru_siyqfYYqo4D7YOkzvb88FRHrjwg64fQkwlQliCsIHpQGBg_9_Qi4wiwxVGYm5iI9dqmbshI9khAhsSTY4OxAFxsJRW8-","tk2":"--AM9QHbix3M2gDOxUDM4UTM9wWY2xXNwgjN2QzN9QWa2xHM9YXZyB3cpxXM9kXYwNXa8FTPwlmd"},"share":{"qq":"http://connect.qq.com/widget/shareqq/index.html?title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E7%89%B9%E8%AD%A6%E9%98%9F%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E&desc=%E5%9C%A8%E8%8A%92%E6%9E%9CTV%E4%B8%8A%E7%9C%8B%E8%A7%81%E8%BF%99%E6%9D%A1%E8%A7%86%E9%A2%91%E8%BF%98%E4%B8%8D%E9%94%99%E5%93%A6%EF%BC%9A%E7%89%B9%E8%AD%A6%E9%98%9F&site=%E8%8A%92%E6%9E%9CTV&url=http://www.mgtv.com/s/7466805.html%3Fdc%3Dd54ad50a-8bcf-4c61-8ac8-e7efabc62f7a%26cxid%3D90fe36tp1&tpa=dW5pb25faWQ9MTAzMjUyXzEwMDAwMV8wMV8wMQ","weixin":"https://www.mgtv.com/share/weixin/?url=http://www.mgtv.com/s/7466805.html%3Fdc%3Dded6f72f-1a5e-41ee-998a-bce6d2d53723&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E7%89%B9%E8%AD%A6%E9%98%9F%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E","weibo":"http://service.weibo.com/share/share.php?appkey=152400019&url=http://www.mgtv.com/s/7466805.html%3Fdc%3D7f90b2be-55a6-434a-b945-6b84d3510e1c%26cxid%3D94f9tkogo&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E7%89%B9%E8%AD%A6%E9%98%9F%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E&content=utf-8&pic=https://1img.hitv.com/preview/sp_images/2020/1/23/dianying/327079/7466805/20200123184631380.jpg","qzone":"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http://www.mgtv.com/s/7466805.html%3Fdc%3D28de707a-d1f2-4ad4-b06a-f25fe680ab32%26cxid%3D90fe36tp1&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E7%89%B9%E8%AD%A6%E9%98%9F%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E","dc":"5601beee-38a0-4079-afd3-5a8dc94d948f"},"user":{"uid":"6627057","ticket":"","iplimit":"0","ip":"14.210.26.1","nickname":"mg39941278kFdk","login":true,"purview":"200","uuid":"d5d8c8f64fa14018a9c5b6b7921023cb","mac":"20ef907b-f7a0-454a-a3af-f548f8e3a5b0","cxid":"1580518655620","isvip":"1"},"stream_quality":{"default_quality_force":"-999","default_quality":"-999"},"drm":{"drmFirm":"","drmType":"","licenseUrl":""},"frame":{"images":["https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_1.jpg","https://1img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_2.jpg","https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_3.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_4.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_5.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_6.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_7.jpg","https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_8.jpg","https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_9.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_10.jpg","https://1img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_11.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_12.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_13.jpg","https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_14.jpg"],"imgSize":"178*100","second":["0|4|9|14|19|24|29|34|39|44|49|54|59|64|69|74|79|84|89|94|99|104|109|114|119|124|129|134|139|144|149|154|159|164|169|174|179|184|189|194|199|204|209|214|219|224|229|234|239|244|249|254|259|264|269|274|279|284|289|294|299|304|309|314|319|324|329|334|339|344|349|354|359|364|369|374|379|384|389|394|399|404|409|414|419|424|429|434|439|444|449|454|459|464|469|474|479|484|489|494","499|504|509|514|519|524|529|534|539|544|549|554|559|564|569|574|579|584|589|594|599|604|609|614|619|624|629|634|639|644|649|654|659|664|669|674|679|684|689|694|699|704|709|714|719|724|729|734|739|744|749|754|759|764|769|774|779|784|789|794|799|804|809|814|819|824|829|834|839|844|849|854|859|864|869|874|879|884|889|894|899|904|909|914|919|924|929|934|939|944|949|954|959|964|969|974|979|984|989|994","999|1004|1009|1014|1019|1024|1029|1034|1039|1044|1049|1054|1059|1064|1069|1074|1079|1084|1089|1094|1099|1104|1109|1114|1119|1124|1129|1134|1139|1144|1149|1154|1159|1164|1169|1174|1179|1184|1189|1194|1199|1204|1209|1214|1219|1224|1229|1234|1239|1244|1249|1254|1259|1264|1269|1274|1279|1284|1289|1294|1299|1304|1309|1314|1319|1324|1329|1334|1339|1344|1349|1354|1359|1364|1369|1374|1379|1384|1389|1394|1399|1404|1409|1414|1419|1424|1429|1434|1439|1444|1449|1454|1459|1464|1469|1474|1479|1484|1489|1494","1499|1504|1509|1514|1519|1524|1529|1534|1539|1544|1549|1554|1559|1564|1569|1574|1579|1584|1589|1594|1599|1604|1609|1614|1619|1624|1629|1634|1639|1644|1649|1654|1659|1664|1669|1674|1679|1684|1689|1694|1699|1704|1709|1714|1719|1724|1729|1734|1739|1744|1749|1754|1759|1764|1769|1774|1779|1784|1789|1794|1799|1804|1809|1814|1819|1824|1829|1834|1839|1844|1849|1854|1859|1864|1869|1874|1879|1884|1889|1894|1899|1904|1909|1914|1919|1924|1929|1934|1939|1944|1949|1954|1959|1964|1969|1974|1979|1984|1989|1994","1999|2004|2009|2014|2019|2024|2029|2034|2039|2044|2049|2054|2059|2064|2069|2074|2079|2084|2089|2094|2099|2104|2109|2114|2119|2124|2129|2134|2139|2144|2149|2154|2159|2164|2169|2174|2179|2184|2189|2194|2199|2204|2209|2214|2219|2224|2229|2234|2239|2244|2249|2254|2259|2264|2269|2274|2279|2284|2289|2294|2299|2304|2309|2314|2319|2324|2329|2334|2339|2344|2349|2354|2359|2364|2369|2374|2379|2384|2389|2394|2399|2404|2409|2414|2419|2424|2429|2434|2439|2444|2449|2454|2459|2464|2469|2474|2479|2484|2489|2494","2499|2504|2509|2514|2519|2524|2529|2534|2539|2544|2549|2554|2559|2564|2569|2574|2579|2584|2589|2594|2599|2604|2609|2614|2619|2624|2629|2634|2639|2644|2649|2654|2659|2664|2669|2674|2679|2684|2689|2694|2699|2704|2709|2714|2719|2724|2729|2734|2739|2744|2749|2754|2759|2764|2769|2774|2779|2784|2789|2794|2799|2804|2809|2814|2819|2824|2829|2834|2839|2844|2849|2854|2859|2864|2869|2874|2879|2884|2889|2894|2899|2904|2909|2914|2919|2924|2929|2934|2939|2944|2949|2954|2959|2964|2969|2974|2979|2984|2989|2994","2999|3004|3009|3014|3019|3024|3029|3034|3039|3044|3049|3054|3059|3064|3069|3074|3079|3084|3089|3094|3099|3104|3109|3114|3119|3124|3129|3134|3139|3144|3149|3154|3159|3164|3169|3174|3179|3184|3189|3194|3199|3204|3209|3214|3219|3224|3229|3234|3239|3244|3249|3254|3259|3264|3269|3274|3279|3284|3289|3294|3299|3304|3309|3314|3319|3324|3329|3334|3339|3344|3349|3354|3359|3364|3369|3374|3379|3384|3389|3394|3399|3404|3409|3414|3419|3424|3429|3434|3439|3444|3449|3454|3459|3464|3469|3474|3479|3484|3489|3494","3499|3504|3509|3514|3519|3524|3529|3534|3539|3544|3549|3554|3559|3564|3569|3574|3579|3584|3589|3594|3599|3604|3609|3614|3619|3624|3629|3634|3639|3644|3649|3654|3659|3664|3669|3674|3679|3684|3689|3694|3699|3704|3709|3714|3719|3724|3729|3734|3739|3744|3749|3754|3759|3764|3769|3774|3779|3784|3789|3794|3799|3804|3809|3814|3819|3824|3829|3834|3839|3844|3849|3854|3859|3864|3869|3874|3879|3884|3889|3894|3899|3904|3909|3914|3919|3924|3929|3934|3939|3944|3949|3954|3959|3964|3969|3974|3979|3984|3989|3994","3999|4004|4009|4014|4019|4024|4029|4034|4039|4044|4049|4054|4059|4064|4069|4074|4079|4084|4089|4094|4099|4104|4109|4114|4119|4124|4129|4134|4139|4144|4149|4154|4159|4164|4169|4174|4179|4184|4189|4194|4199|4204|4209|4214|4219|4224|4229|4234|4239|4244|4249|4254|4259|4264|4269|4274|4279|4284|4289|4294|4299|4304|4309|4314|4319|4324|4329|4334|4339|4344|4349|4354|4359|4364|4369|4374|4379|4384|4389|4394|4399|4404|4409|4414|4419|4424|4429|4434|4439|4444|4449|4454|4459|4464|4469|4474|4479|4484|4489|4494","4499|4504|4509|4514|4519|4524|4529|4534|4539|4544|4549|4554|4559|4564|4569|4574|4579|4584|4589|4594|4599|4604|4609|4614|4619|4624|4629|4634|4639|4644|4649|4654|4659|4664|4669|4674|4679|4684|4689|4694|4699|4704|4709|4714|4719|4724|4729|4734|4739|4744|4749|4754|4759|4764|4769|4774|4779|4784|4789|4794|4799|4804|4809|4814|4819|4824|4829|4834|4839|4844|4849|4854|4859|4864|4869|4874|4879|4884|4889|4894|4899|4904|4909|4914|4919|4924|4929|4934|4939|4944|4949|4954|4959|4964|4969|4974|4979|4984|4989|4994","4999|5004|5009|5014|5019|5024|5029|5034|5039|5044|5049|5054|5059|5064|5069|5074|5079|5084|5089|5094|5099|5104|5109|5114|5119|5124|5129|5134|5139|5144|5149|5154|5159|5164|5169|5174|5179|5184|5189|5194|5199|5204|5209|5214|5219|5224|5229|5234|5239|5244|5249|5254|5259|5264|5269|5274|5279|5284|5289|5294|5299|5304|5309|5314|5319|5324|5329|5334|5339|5344|5349|5354|5359|5364|5369|5374|5379|5384|5389|5394|5399|5404|5409|5414|5419|5424|5429|5434|5439|5444|5449|5454|5459|5464|5469|5474|5479|5484|5489|5494","5499|5504|5509|5514|5519|5524|5529|5534|5539|5544|5549|5554|5559|5564|5569|5574|5579|5584|5589|5594|5599|5604|5609|5614|5619|5624|5629|5634|5639|5644|5649|5654|5659|5664|5669|5674|5679|5684|5689|5694|5699|5704|5709|5714|5719|5724|5729|5734|5739|5744|5749|5754|5759|5764|5769|5774|5779|5784|5789|5794|5799|5804|5809|5814|5819|5824|5829|5834|5839|5844|5849|5854|5859|5864|5869|5874|5879|5884|5889|5894|5899|5904|5909|5914|5919|5924|5929|5934|5939|5944|5949|5954|5959|5964|5969|5974|5979|5984|5989|5994","5999|6004|6009|6014|6019|6024|6029|6034|6039|6044|6049|6054|6059|6064|6069|6074|6079|6084|6089|6094|6099|6104|6109|6114|6119|6124|6129|6134|6139|6144|6149|6154|6159|6164|6169|6174|6179|6184|6189|6194|6199|6204|6209|6214|6219|6224|6229|6234|6239|6244|6249|6254|6259|6264|6269|6274|6279|6284|6289|6294|6299|6304|6309|6314|6319|6324|6329|6334|6339|6344|6349|6354|6359|6364|6369|6374|6379|6384|6389|6394|6399|6404|6409|6414|6419|6424|6429|6434|6439|6444|6449|6454|6459|6464|6469|6474|6479|6484|6489|6494","6499|6504|6509|6514|6519|6524|6529|6534|6539|6544|6549|6554|6559|6564|6569|6574|6579|6584"]},"points":{"start":"51|片头","end":"6417|片尾","content":[]},"info":{"authInfo":null,"buytips":"","clipLimit":0,"clip_type":"1","collection_id":"327079","collection_name":"","desc":"贾乃亮凌潇肃守护城市安全","drm":null,"drmFlag":"0","duration":"6588","keepPlay":null,"keepPlayType":0,"paymark":"1","playlist_id":"","playlist_name":"","price_novip":"","price_vip":"","root_id":"3","series":"第 1 集","series_id":"0","starPointFlag":"0","thumb":"https://1img.hitv.com/preview/sp_images/2020/1/23/dianying/327079/7466805/20200123184631380.jpg","tips":null,"title":"特警队","trialtime":"300","url":"https://www.mgtv.com/s/7466805.html","video_id":"7466805","watchTime":0}},"seqid":"98e5c6e78bb84079baea57d925648b81"})

结论:"suuid"的值固定时并不影响使用

∴获得"pm2"只需计算"tk2"

到此为止,我们已经有能力解析出视频的链接了

现在要检查一下在没有Vip会员Cookie的情况下,接口还能不能正常使用

先测试pm2的接口

测试方式:在没有Vip会员Cookie的浏览器用无痕模式打开接口

返回内容:

jsonp_1580518683796_96705({"msg":"","code":200,"data":{"atc":{"pm2":"SK08BzUJx1UdXWnVz3ev6vGtVKW5jOdMp7xN~JzA0Fx3~X0Y84SFTtqea1W8MgPOnUw9M7p9b5oufJkDktND5Ge0OWEg6gftNPL2~2BYrEx0XMHCzKFGwhlPBKmGVHbiMoWY2eWT37wH1kwFUM3WDt~QPqyQgWqT_WqbjKyi1MadZx3qEuNzrgQcaolnzkPnu_jR_tyAzXGiZnH~c1_~MXobd0FsW7d7schvJ7hjsBIaLRYx9MEGFFVwontoNhf1","tk2":"--AM9QHbix3M2gDOxUDM4UTM9wWY2x3N5MzN3QzN9QWa2xXM9YXZyB3cpxXM9kXYwNXa8BTPwlmd"},"share":{"qq":"http://connect.qq.com/widget/shareqq/index.html?title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E5%AE%A0%E7%88%B1%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E&desc=%E5%9C%A8%E8%8A%92%E6%9E%9CTV%E4%B8%8A%E7%9C%8B%E8%A7%81%E8%BF%99%E6%9D%A1%E8%A7%86%E9%A2%91%E8%BF%98%E4%B8%8D%E9%94%99%E5%93%A6%EF%BC%9A%E5%AE%A0%E7%88%B1&site=%E8%8A%92%E6%9E%9CTV&url=http://www.mgtv.com/s/7477397.html%3Fdc%3Dcfa58791-837d-4e2c-b5b5-7974cdf65324%26cxid%3D90fe36tp1&tpa=dW5pb25faWQ9MTAzMjUyXzEwMDAwMV8wMV8wMQ","weixin":"https://www.mgtv.com/share/weixin/?url=http://www.mgtv.com/s/7477397.html%3Fdc%3D4561666c-ecca-4a48-a29d-39d012ee6a8b&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E5%AE%A0%E7%88%B1%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E","weibo":"http://service.weibo.com/share/share.php?appkey=152400019&url=http://www.mgtv.com/s/7477397.html%3Fdc%3De71c2a75-0ab9-417e-b6bc-072ec6b13c5d%26cxid%3D94f9tkogo&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E5%AE%A0%E7%88%B1%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E&content=utf-8&pic=https://0img.hitv.com/preview/sp_images/2020/1/27/dianying/331440/7477397/20200127235537405.jpg","qzone":"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http://www.mgtv.com/s/7477397.html%3Fdc%3D7ae312be-2c33-43bb-be6a-2be3ecdedb2e%26cxid%3D90fe36tp1&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E5%AE%A0%E7%88%B1%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E","dc":"56a26445-ed89-415c-ae4f-ba4a2f253b5d"},"user":{"iplimit":"0","ticket":"","ip":"14.210.26.1","nickname":"","login":false,"purview":"101","uuid":"","isvip":"0"},"stream_quality":{"default_quality_force":"-999","default_quality":"-999"},"drm":{"drmFirm":"","drmType":"","licenseUrl":""},"frame":{"images":["https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_1.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_2.jpg","https://1img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_3.jpg","https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_4.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_5.jpg","https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_6.jpg","https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_7.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_8.jpg","https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_9.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_10.jpg","https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_11.jpg","https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_12.jpg","https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/108301/5660102/37717941_178x100_13.jpg"],"imgSize":"178*100","second":["0|4|9|14|19|24|29|34|39|44|49|54|59|64|69|74|79|84|89|94|99|104|109|114|119|124|129|134|139|144|149|154|159|164|169|174|179|184|189|194|199|204|209|214|219|224|229|234|239|244|249|254|259|264|269|274|279|284|289|294|299|304|309|314|319|324|329|334|339|344|349|354|359|364|369|374|379|384|389|394|399|404|409|414|419|424|429|434|439|444|449|454|459|464|469|474|479|484|489|494","499|504|509|514|519|524|529|534|539|544|549|554|559|564|569|574|579|584|589|594|599|604|609|614|619|624|629|634|639|644|649|654|659|664|669|674|679|684|689|694|699|704|709|714|719|724|729|734|739|744|749|754|759|764|769|774|779|784|789|794|799|804|809|814|819|824|829|834|839|844|849|854|859|864|869|874|879|884|889|894|899|904|909|914|919|924|929|934|939|944|949|954|959|964|969|974|979|984|989|994","999|1004|1009|1014|1019|1024|1029|1034|1039|1044|1049|1054|1059|1064|1069|1074|1079|1084|1089|1094|1099|1104|1109|1114|1119|1124|1129|1134|1139|1144|1149|1154|1159|1164|1169|1174|1179|1184|1189|1194|1199|1204|1209|1214|1219|1224|1229|1234|1239|1244|1249|1254|1259|1264|1269|1274|1279|1284|1289|1294|1299|1304|1309|1314|1319|1324|1329|1334|1339|1344|1349|1354|1359|1364|1369|1374|1379|1384|1389|1394|1399|1404|1409|1414|1419|1424|1429|1434|1439|1444|1449|1454|1459|1464|1469|1474|1479|1484|1489|1494","1499|1504|1509|1514|1519|1524|1529|1534|1539|1544|1549|1554|1559|1564|1569|1574|1579|1584|1589|1594|1599|1604|1609|1614|1619|1624|1629|1634|1639|1644|1649|1654|1659|1664|1669|1674|1679|1684|1689|1694|1699|1704|1709|1714|1719|1724|1729|1734|1739|1744|1749|1754|1759|1764|1769|1774|1779|1784|1789|1794|1799|1804|1809|1814|1819|1824|1829|1834|1839|1844|1849|1854|1859|1864|1869|1874|1879|1884|1889|1894|1899|1904|1909|1914|1919|1924|1929|1934|1939|1944|1949|1954|1959|1964|1969|1974|1979|1984|1989|1994","1999|2004|2009|2014|2019|2024|2029|2034|2039|2044|2049|2054|2059|2064|2069|2074|2079|2084|2089|2094|2099|2104|2109|2114|2119|2124|2129|2134|2139|2144|2149|2154|2159|2164|2169|2174|2179|2184|2189|2194|2199|2204|2209|2214|2219|2224|2229|2234|2239|2244|2249|2254|2259|2264|2269|2274|2279|2284|2289|2294|2299|2304|2309|2314|2319|2324|2329|2334|2339|2344|2349|2354|2359|2364|2369|2374|2379|2384|2389|2394|2399|2404|2409|2414|2419|2424|2429|2434|2439|2444|2449|2454|2459|2464|2469|2474|2479|2484|2489|2494","2499|2504|2509|2514|2519|2524|2529|2534|2539|2544|2549|2554|2559|2564|2569|2574|2579|2584|2589|2594|2599|2604|2609|2614|2619|2624|2629|2634|2639|2644|2649|2654|2659|2664|2669|2674|2679|2684|2689|2694|2699|2704|2709|2714|2719|2724|2729|2734|2739|2744|2749|2754|2759|2764|2769|2774|2779|2784|2789|2794|2799|2804|2809|2814|2819|2824|2829|2834|2839|2844|2849|2854|2859|2864|2869|2874|2879|2884|2889|2894|2899|2904|2909|2914|2919|2924|2929|2934|2939|2944|2949|2954|2959|2964|2969|2974|2979|2984|2989|2994","2999|3004|3009|3014|3019|3024|3029|3034|3039|3044|3049|3054|3059|3064|3069|3074|3079|3084|3089|3094|3099|3104|3109|3114|3119|3124|3129|3134|3139|3144|3149|3154|3159|3164|3169|3174|3179|3184|3189|3194|3199|3204|3209|3214|3219|3224|3229|3234|3239|3244|3249|3254|3259|3264|3269|3274|3279|3284|3289|3294|3299|3304|3309|3314|3319|3324|3329|3334|3339|3344|3349|3354|3359|3364|3369|3374|3379|3384|3389|3394|3399|3404|3409|3414|3419|3424|3429|3434|3439|3444|3449|3454|3459|3464|3469|3474|3479|3484|3489|3494","3499|3504|3509|3514|3519|3524|3529|3534|3539|3544|3549|3554|3559|3564|3569|3574|3579|3584|3589|3594|3599|3604|3609|3614|3619|3624|3629|3634|3639|3644|3649|3654|3659|3664|3669|3674|3679|3684|3689|3694|3699|3704|3709|3714|3719|3724|3729|3734|3739|3744|3749|3754|3759|3764|3769|3774|3779|3784|3789|3794|3799|3804|3809|3814|3819|3824|3829|3834|3839|3844|3849|3854|3859|3864|3869|3874|3879|3884|3889|3894|3899|3904|3909|3914|3919|3924|3929|3934|3939|3944|3949|3954|3959|3964|3969|3974|3979|3984|3989|3994","3999|4004|4009|4014|4019|4024|4029|4034|4039|4044|4049|4054|4059|4064|4069|4074|4079|4084|4089|4094|4099|4104|4109|4114|4119|4124|4129|4134|4139|4144|4149|4154|4159|4164|4169|4174|4179|4184|4189|4194|4199|4204|4209|4214|4219|4224|4229|4234|4239|4244|4249|4254|4259|4264|4269|4274|4279|4284|4289|4294|4299|4304|4309|4314|4319|4324|4329|4334|4339|4344|4349|4354|4359|4364|4369|4374|4379|4384|4389|4394|4399|4404|4409|4414|4419|4424|4429|4434|4439|4444|4449|4454|4459|4464|4469|4474|4479|4484|4489|4494","4499|4504|4509|4514|4519|4524|4529|4534|4539|4544|4549|4554|4559|4564|4569|4574|4579|4584|4589|4594|4599|4604|4609|4614|4619|4624|4629|4634|4639|4644|4649|4654|4659|4664|4669|4674|4679|4684|4689|4694|4699|4704|4709|4714|4719|4724|4729|4734|4739|4744|4749|4754|4759|4764|4769|4774|4779|4784|4789|4794|4799|4804|4809|4814|4819|4824|4829|4834|4839|4844|4849|4854|4859|4864|4869|4874|4879|4884|4889|4894|4899|4904|4909|4914|4919|4924|4929|4934|4939|4944|4949|4954|4959|4964|4969|4974|4979|4984|4989|4994","4999|5004|5009|5014|5019|5024|5029|5034|5039|5044|5049|5054|5059|5064|5069|5074|5079|5084|5089|5094|5099|5104|5109|5114|5119|5124|5129|5134|5139|5144|5149|5154|5159|5164|5169|5174|5179|5184|5189|5194|5199|5204|5209|5214|5219|5224|5229|5234|5239|5244|5249|5254|5259|5264|5269|5274|5279|5284|5289|5294|5299|5304|5309|5314|5319|5324|5329|5334|5339|5344|5349|5354|5359|5364|5369|5374|5379|5384|5389|5394|5399|5404|5409|5414|5419|5424|5429|5434|5439|5444|5449|5454|5459|5464|5469|5474|5479|5484|5489|5494","5499|5504|5509|5514|5519|5524|5529|5534|5539|5544|5549|5554|5559|5564|5569|5574|5579|5584|5589|5594|5599|5604|5609|5614|5619|5624|5629|5634|5639|5644|5649|5654|5659|5664|5669|5674|5679|5684|5689|5694|5699|5704|5709|5714|5719|5724|5729|5734|5739|5744|5749|5754|5759|5764|5769|5774|5779|5784|5789|5794|5799|5804|5809|5814|5819|5824|5829|5834|5839|5844|5849|5854|5859|5864|5869|5874|5879|5884|5889|5894|5899|5904|5909|5914|5919|5924|5929|5934|5939|5944|5949|5954|5959|5964|5969|5974|5979|5984|5989|5994","5999|6004|6009|6014|6019|6024|6029|6034|6039|6044|6049|6054|6059|6064|6069|6074|6079|6084|6089|6094|6099|6104|6109|6114|6119|6124|6129|6134|6139|6144|6149|6154|6159|6164|6169|6174|6179|6184|6189|6194|6199|6204|6209|6214|6219|6224|6229|6234|6239|6244|6249|6254|6259|6264|6269|6274|6279|6284|6289|6294|6299|6304|6309|6314|6319|6324|6329|6334|6339|6344|6349|6354|6359|6364|6369|6374|6379|6384|6389|6394|6399|6404|6409|6414|6419|6424|6429|6434|6439|6444|6449|6454|6459|6464|6469"]},"points":{"start":"64|片头","end":"6190|片尾","content":[]},"info":{"authInfo":{"pay_info":{"preview_playing":{"components":[{"code":"button","action":{"tag":10001},"text":"立即开通"}]},"preview_end":{"components":[{"code":"title","line_num":0,"text":"尊敬的用户,开通会员可免费观看本片"},{"code":"subtitle","line_num":1,"text":"会员每月获赠2张观影券"},{"code":"button","line_num":3,"superscript":"新用户首3月仅9元/月","action":{"tag":10001},"text":"开通会员免费观看"},{"code":"link","line_num":4,"action":{"tag":10002},"text":"5元购买本片"}]},"preview_starting":{"components":[{"code":"title","text":"免费试看5分钟,看完整版请"},{"code":"button","action":{"tag":10001},"text":"开通会员"}]}}},"buytips":"","clipLimit":1,"clip_type":"1","collection_id":"331440","collection_name":"","desc":"吴磊演绎人与宠物的暖心故事","drm":null,"drmFlag":"0","duration":"6473","keepPlay":null,"keepPlayType":0,"paymark":"1","playlist_id":"","playlist_name":"","price_novip":"","price_vip":"","root_id":"3","series":"第 1 集","series_id":"0","starPointFlag":"0","thumb":"https://0img.hitv.com/preview/sp_images/2020/1/27/dianying/331440/7477397/20200127235537405.jpg","tips":null,"title":"宠爱","trialtime":"300","url":"https://www.mgtv.com/s/7477397.html","video_id":"7477397","watchTime":0}},"seqid":"f830e103384146eb92240e1c107483c3"})

与之前用Vip Cookie的情况对比,提示只能试看五分钟,看完整版需要付费观看或者开通会员

"preview_starting":{"components":[{"code":"title","text":"免费试看5分钟,看完整版请"},{"code":"button","action":{"tag":10001},"text":"开通会员"}]}}}

"components":[{"code":"title","text":"免费试看5分钟,看完整版请"},{"code":"button","action":{"tag":10001},"text":"开通会员"}]

先不管提示,用返回的pm2和tk2,解析一下视频链接试一下

返回json:

jsonp_1580518684003_9741({"msg":"","code":200,"data":{"sourceTicket":"","stream":[{"def":"1","name":"标清","scale":"1.85:1","filebitrate":"361","fileformat":"HLS-TS","vip":"0","url":"/atcl?pm2=1r2pJV7PHMrf2Gd8iXSaMIzbDSXkB_RfgZDnL5pca4AItCXKJvR~NMIvFSb~pPrkegOShGOW0KiN9LkBF2q8I3Mriza8aGHuikaXbBUJUtzI6lUf687el8RzUz3cPKkIw6YRx1ZTODYRGGCxXG6cnHaU~__mbr2XObNE7kMEVE_R4XadhTVn8tURmCV1RLl~ZquY~NTyu6q6JkYUQ2whfqXHemkLJbU23s4IoXfAZL6TmwG6LKre_Me3iAUupdnqoQjAR6vRC7qgdIgouLQ1FM0gnMp2VDds6R8H9w2KxuFser~hBWRspOBDKAPnD0JJAtS_xpPFpDRPHpPhIL__n9G~bFCMuTn5lHgGjqJXJVfaKy4KDdzylJHlvuL~Dwhu8AzFscRyHKmLyfaC7mlZFJU1mXvXnq~6OwkzDsIh4FwmcAvvvRVkfDNnJf4Mukt7zk7Rizd8q_X3ZOCVrsmetkH04SIjrmzbp~4ejOfq1nlqEb~1Bip8EjExnlIxc1by~BJiZ4HoxSTf6fI42uJiaTPZI6MhBA21SnoXBw--&gsid=c3d45415-fc26-4795-b653-b172fb4b214b&pno=1030&arange=0"},{"def":"2","name":"高清","scale":"1.85:1","filebitrate":"647","fileformat":"HLS-TS","vip":"0","url":"/atcl?pm2=vQ8kGfmRrglJrHRVbMOurOjNz1Lv_H4L_ilk6EZg0lo_~3Bz3VNDDPYcb~wA2vFagyrmzjV5hWYO4pPBHxyHw4Gpk2xvJqT2DM1VNvpSPdfYFRxzpAZPY0WDbShDQ573ntpgYEmVhrOjYO~lllyU6RBI5LzwwE5R8IDPZBA9HtRu9uPOHCBrX_K5gohTJTJNdwVXE0~vChrLPuqSy4ka_diOrMBdgJXDaqJBG_geuBnPl6SKC5CiolLpl30qBhTgJCimBRqvyXgxUk3J~IdDHc3aREHSSYVW9Afute_Co637TnYnlhf5gwZevQb55dd1qT571ray5gqbQYzeYG2WKEvvuGyw_sgLS0UFY3tX1jwu4Yj3i0eUMWFyzEe9uXGbCcMytxwIHdmwxCK9Q6XlbsPEGy~RMGNj1kLiUHSJ9DiBwTAHQcYVKnthSQ8Az~DtXLxo7Bcc~k_gypvJ81shFDhLloqbelfPkT3TZvfZZ~yExkGzE6CjRKPEZ20Bq6b62soGzhEbM2bxAXPac4ueTGHYBa7ktxLXzCrXNA--&gsid=aa4ebeca-2df9-4cb7-8862-9cfb01215526&pno=1030&arange=0"},{"def":"3","name":"超清","scale":"1.85:1","filebitrate":"954","fileformat":"HLS-TS","vip":"0","url":"/atcl?pm2=l_MAiKGTWrfhExARxNxlWJkSbdfgQwBKg8UjW24kVpNr95z9NJWfGj2GdE1SoS~YlUm7c3zv9dw_2Of6wJK6JJ9raPw2wKNrqlLV6aOMO16~SiGLFGE2oNW8EIdfIzy2n6~DFJrResl_tXdnSsFiimrr3VEyhnQCFywbpzLOBbYIHKYTPNv0RJQqyapJ_wXxKMHFLy3p0FCnFxLbKGpZh6iBvWz4srEmOWJGbmTAL7iffBKScwJlP4OThk_fXrXTOpFjQ5NkMOjs0TQKqRElp6NR97o9Z9kWe1Mr41eisczl8FJUsa09n_~N3Ob8Qc0lIHcojwV3l3dVq5sEmHjc7R2Q2oTM7H60kFpMNnw_yWMd_keJ5Xy_m_jHmPkzMjSwoi4X1vXYLWKmWp8jV9_DLynwFQsd0YdePEnd3WM9qINnE55bWBgM2EQfB_4Pe4n7wo3Wm4ZTu7ioeIeyQRXeYyU8o1X01~R6qqUi3qp_BtMH7_eu9m1zflUaYOeQiT03tWhDOGKxOZ885UaTKv3qkljxRrsxD7QDz2GsNA--&gsid=986ad66a-9ce1-4565-87f6-f18675b99ba1&pno=1030&arange=0"},{"def":"4","name":"蓝光","scale":"1.85:1","filebitrate":"1960","fileformat":"HLS-TS","vip":"1","url":""}],"tk2":"-MzNyMzM1ADO1ETPsFmd","stream_domain":["https://web-disp.titan.mgtv.com","https://web-disp1.titan.mgtv.com","https://web-disp2.titan.mgtv.com"]},"seqid":"429e3a86eb114f37baf7e2d42886fbdd"})

拼接"stream_domain"和"url"再访问试一下

https://web-disp.titan.mgtv.com/atcl?pm2=l_MAiKGTWrfhExARxNxlWJkSbdfgQwBKg8UjW24kVpNr95z9NJWfGj2GdE1SoS~YlUm7c3zv9dw_2Of6wJK6JJ9raPw2wKNrqlLV6aOMO16~SiGLFGE2oNW8EIdfIzy2n6~DFJrResl_tXdnSsFiimrr3VEyhnQCFywbpzLOBbYIHKYTPNv0RJQqyapJ_wXxKMHFLy3p0FCnFxLbKGpZh6iBvWz4srEmOWJGbmTAL7iffBKScwJlP4OThk_fXrXTOpFjQ5NkMOjs0TQKqRElp6NR97o9Z9kWe1Mr41eisczl8FJUsa09n_~N3Ob8Qc0lIHcojwV3l3dVq5sEmHjc7R2Q2oTM7H60kFpMNnw_yWMd_keJ5Xy_m_jHmPkzMjSwoi4X1vXYLWKmWp8jV9_DLynwFQsd0YdePEnd3WM9qINnE55bWBgM2EQfB_4Pe4n7wo3Wm4ZTu7ioeIeyQRXeYyU8o1X01~R6qqUi3qp_BtMH7_eu9m1zflUaYOeQiT03tWhDOGKxOZ885UaTKv3qkljxRrsxD7QDz2GsNA--&gsid=986ad66a-9ce1-4565-87f6-f18675b99ba1&pno=1030&arange=0

返回json:

{"ver":"4.7.7","info":"https://pcvideoaliyun.titan.mgtv.com/c1/2020/01/28_2/8FA4BFAD60818A127B7D74FCB87E42A3_20200128_1_1_957_mp4/247BB114DBBB0DFCC57198B5F48D0FE5.m3u8?arange=0&pm=n0B8Ia2kQI~198SNizt74ZWnvOvqdegXRgL4xiQPzYs7Iv7ARxq46rNeAFWP47N3rH43chtNn3kXE_6K2N2~AVsfM7bSEHVThCEZ8vQ_jyYgQgtteTDqLSYmtivF4DSeRBdQxaWVlFWcxQKIcKpjnSSQs9uwF9Hjoibh2DahXLgTCTx7qWUf8ydXzd34S1QXn_6glsXwmExyiTCAVzv4tSr1huPblXCnOP~i_wm7rZLV8sjQ4z6u5q5KszFwPnw9g~40cAQFcupRL4PFC4Oxx7NHvhdaeprCiaDwg_3gouKNpze9e2wovs2Z6nGh~Ed5QsDHFan7h4qmq6TwcYNnX5NwHXNrasI4gnjI4Prhl5sYNmvaAT0YOR7B_Qd8tjcNlgPaDent1BpeRO_BMQW2EufEl8pIrUXA76Gy_UPuUZZQS6A0NlO70Eg3xm7ChuqYOlyW5PzV3RKI0Ih7~GrazU2slNGbMERLME8WRkrpaMcf~aWv&mr=H4FMXzOLcpZT7AvKXI_YO2fK4znJNcLC7eYnU~HErd~FSV7ThdRX_mjebrPZFsEDcXzf0PDrJnQqQNkrnQu2aP8ggwJpx0s3istWCxTmt~KqJKMDldSQTiJf04wDXhD7D0UhGXCIFFQ-&vcdn=0&scid=25021","t":1580520410,"ext":"0","isothercdn":1,"loc":"386","status":"ok","idc":"aliyun_cdn"}

成功解析视频,复制"info"的视频链接在播放器打开看一下

image-20200201093112450

提示"无法播放"

在浏览器打开试一下

提示403

image-20200201093248616

下载试一下

Screenshot_1580520815

下载成功,但是只有23KB,打开看一下

image-20200201093538983

是有效内容,拼接一下.ts视频链接,下载试一下

https://pcvideoaliyun.titan.mgtv.com/c1/2020/01/28_2/8FA4BFAD60818A127B7D74FCB87E42A3_20200128_1_1_957_mp4/
13D3B950F86AFE463905D047CC1DC0A1_0_5080_491_v02_mp4.ts?arange=0&pm=n0B8Ia2kQI~198SNizt74ZWnvOvqdegXRgL4xiQPzYs7Iv7ARxq46rNeAFWP47N3rH43chtNn3kXE_6K2N2~AVsfM7bSEHVThCEZ8vQ_jyYgQgtteTDqLSYmtivF4DSeRBdQxaWVlFWcxQKIcKpjnSSQs9uwF9Hjoibh2DahXLgTCTx7qWUf8ydXzd34S1QXn_6glsXwmExyiTCAVzv4tSr1huPblXCnOP~i_wm7rZLV8sjQ4z6u5q5KszFwPnw9g~40cAQFcupRL4PFC4Oxx7NHvhdaeprCiaDwg_3gouKNpze9e2wovs2Z6nGh~Ed5QsDHFan7h4qmq6TwcYNnX5NwHXNrasI4gnjI4Prhl5sYNmvaAT0YOR7B_Qd8tjcNlgPaDent1BpeRO_BMQW2EufEl8pIrUXA76Gy_UPuUZZQS6A0NlO70Eg3xm7ChuqYOlyW5PzV3RKI0Ih7~GrazU2slNGbMERLME8WRkrpaMcf~aWv&mr=H4FMXzOLcpZT7AvKXI_YO2fK4znJNcLC7eYnU~HErd~FSV7ThdRX_mjebrPZFsEDcXzf0PDrJnQqQNkrnQu2aP8ggwJpx0s3istWCxTmt~KqJKMDldSQTiJf04wDXhD7D0UhGXCIFFQ-&vcdn=0&scid=25021
https://pcvideoaliyun.titan.mgtv.com/c1/2020/01/28_2/8FA4BFAD60818A127B7D74FCB87E42A3_20200128_1_1_957_mp4/13D3B950F86AFE463905D047CC1DC0A1_0_5080_491_v02_mp4.ts?arange=0&pm=n0B8Ia2kQI~198SNizt74ZWnvOvqdegXRgL4xiQPzYs7Iv7ARxq46rNeAFWP47N3rH43chtNn3kXE_6K2N2~AVsfM7bSEHVThCEZ8vQ_jyYgQgtteTDqLSYmtivF4DSeRBdQxaWVlFWcxQKIcKpjnSSQs9uwF9Hjoibh2DahXLgTCTx7qWUf8ydXzd34S1QXn_6glsXwmExyiTCAVzv4tSr1huPblXCnOP~i_wm7rZLV8sjQ4z6u5q5KszFwPnw9g~40cAQFcupRL4PFC4Oxx7NHvhdaeprCiaDwg_3gouKNpze9e2wovs2Z6nGh~Ed5QsDHFan7h4qmq6TwcYNnX5NwHXNrasI4gnjI4Prhl5sYNmvaAT0YOR7B_Qd8tjcNlgPaDent1BpeRO_BMQW2EufEl8pIrUXA76Gy_UPuUZZQS6A0NlO70Eg3xm7ChuqYOlyW5PzV3RKI0Ih7~GrazU2slNGbMERLME8WRkrpaMcf~aWv&mr=H4FMXzOLcpZT7AvKXI_YO2fK4znJNcLC7eYnU~HErd~FSV7ThdRX_mjebrPZFsEDcXzf0PDrJnQqQNkrnQu2aP8ggwJpx0s3istWCxTmt~KqJKMDldSQTiJf04wDXhD7D0UhGXCIFFQ-&vcdn=0&scid=25021

image-20200201093850076

下载成功,播放试一下

image-20200201094710693

播放成功,证明m3u8文件没问题,应该是某果TV的限制或者是播放器的问题

换个播放器试一下

https://www.hlsplayer.net/

image-20200201095242927

可以播放了,但是有五分钟的时长

在带有Vip Cookie浏览器重复上述操作

播放器还是无法播放,直接访问还是403,直接换刚才那个播放器试一下

Screenshot_1580522540

可以播放,而且是完整版

∴问题出在Cookie上面,解析vip视频需要带上Vip 的Cookie

编写php文件,进行本地测试,浏览器无cookie情况下测试

1.先测试tk2的生成

Screenshot_1580557808

生成成功!

接下来试一下拼接接口链接并获取pm2

function hs($url,$ua,$cookie)
{
$ch = curl_init();
$timeout = 0;
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array($ua));
curl_setopt($ch, CURLOPT_COOKIE, $cookie); 
curl_setopt($ch, CURLOPT_URL, $url);
$hs_content = curl_exec($ch);
    return $hs_content;
}

$video_id = '7477397';
$ua = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36';
$cookie = '__guid=24428860.2761247738319087600.1580025714119.5637; __random_seed=0.5245024189692014; MQGUID=1221342208167497728; __MQGUID=1221342208167497728; PLANB_FREQUENCY=Xi1HdP4bzVY5lNmQ; PM_CHKID=67f528e44508f6aa; mba_deviceid=b4d810ad-0dac-cc3a-50f5-5fc602c38d7e; mba_cxid=90fe36tp1; __gads=ID=ec7077b65bd1b86e:T=1580025718:S=ALNI_Mb0oPzUJykfxPlDBJ0zT9jsEwiACA; mba_cxid_expiration=1580227200000; id=6627057; rnd=rnd; seqid=boo5ihau3du5r98unmlg; uuid=d5d8c8f64fa14018a9c5b6b7921023cb; loginAccount=16675914159; vipStatus=1; wei=95a69cea65a554c1be638bcd3426bdc7; wei2=66d0P1OWbEWYMxguJ9Kq9p4Xa78sXgZnRvR8pN%2BkMpVr1QcfIppMiYHkZ6qHlXOvCGtJXHpeV45f2I3DOsVmDd5PrMA9csREzlhtLYKHA4IM%2Bv%2BmCGRGGuFY3SA2XvPxV9kp5PpTjciocDXjTBOca9qeWt%2FrRoMdFobRZjIS4lWZ6sW66eGswipU7iFMU5zmegZhwB63Qrk; HDCN=BOO5IGSR1Q1IE5GHN160-118851676; __STKUUID=20ef907b-f7a0-454a-a3af-f548f8e3a5b0; pc_v6=v6; monitor_count=1; sessionid=1580354708471; beta_timer=1580354711575; lastActionTime=1580354711752';
$pm2_url = 'https://pcweb.api.mgtv.com/player/video?did=' . $did . '&suuid=' . $suuid . '&cxid=&tk2=' . $tk2 . '&video_id=' . $video_id . '&type=pch5&_support=10000000&auth_mode=1&callback=';
$pm2_content = hs($pm2_url,$ua,$cookie);
echo $pm2_content;

带PC浏览器UA和Vip Cookie模拟PC浏览器访问

image-20200201195936403

没有数据返回,因为根本没有发送请求出去

百度了一下,是因为接口是"https://",要加上下面两行代码才能正常发送请求

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //不验证证书

获取pm2成功,而且还有一个tk2,那下一步解析视频的时候用的是一开始的tk2还是现在这个tk2呢?

把在官方调用解析视频接口用的tk2进行解密看一下就知道了

tk2解密代码:

" . "这个是官方调用解析视频接口用的tk2解密:" . $gf_de_tk2 . "
" . "这个是获取pm2返回的json里面的tk2解密:" . $pm2_de_tk2; ?>

image-20200201203225153

从解密中可以看出来,官方无论是调用获取pm2的接口还是调用解析视频的接口所使用的tk2都和我们获得的算法算出来的tk2一样,不是用的pm2接口返回json里面的tk2,而且由时间可得官方每一次调用接口都是重新生成一次tk2的

逆向思路:

  1. 把pm2的值从json获取出来
  2. 再次生成tk2,拼接解析视频的接口链接,获取视频链接

因为接口返回的是json,所以要把json转成数组,方便获取pm2的值

$pm2_json = json_decode($pm2_content, true);
$pm2 = $pm2_json['data']['atc']['pm2'];

访问解析视频的接口:

$analysis_url = 'https://pcweb.api.mgtv.com/player/getSource?_support=10000000&tk2=' . tk2($did,getMillisecond()) . '&pm2=' . $pm2 . '&video_id=' . $video_id . '&type=pch5&callback=';
$analysis_content = hs($analysis_url,$ua,$cookie);
echo $analysis_content;

image-20200201210533967

视频链接获取成功,但还不是视频文件的直链,还要访问一下json里面的视频链接获取视频文件的直链

逆向思路:

  1. 用for循环遍历$analysis_json['data']['stream']获取该视频链接对应的名称(清晰度)和视频链接
  2. 再获取stream_domain,然后拼接成完整的视频链接
  3. 访问视频链接,获取视频直链

先弄个获取视频链接的demo在弄for遍历

根据刚刚json的数据,手动拼接出蓝光的视频链接

https://web-disp.titan.mgtv/atcl?pm2=mICOXmkdDQpA00je48fHKcPRihiZtXk5aYcxIWT6U5ThcQ0BMw2LHJP2VC2c7RyWhNb2_e1NJ9cG8eVCVtenFI2LwbVkCVyphArwOJG1zMQaSlRWbTXYnevz2ZrYiTUP5P_q5vSTpScWsEIFZvLOOSYMWVivqJX2z5QsgSuewE2vIQKbI5s2QeUa4SapclvopXlwmDp5O3sxj6lbEIaz_nAid1l6m6446yvkC3ghQVD7jHUlHT~rrS9orKgx_o_Np2m7VNoDJGc_jVDwDM1DpUnhUKXfwmR2vur9twqU~MujRkg_WBhs9r8sREAaggIzUD~MGsK6vCjhLpXVBCzizn39bnQe3pZxK4BrxdwtcIedRzPdUdEZRag3sQiMVXwidMbHEwl0iSdido3pbebC6AYceFKdCMiKjGR~AKV0tR62J_cBGPgv8xOkkH2s3BK8lLU2v8q6z_nRZQhxOv3dsJNfeFSnCSOw_Vu0jNJ644iupOqM6_I~eJqaMlBc1~9dmqO~ruGfbi3N5tKmjeSNuqLRULYBdZT5at0ZSYld2tgo6J3NqK7PtNaCza6ZBHRD3kkbRbagKVERsKzyHGHllQ--&gsid=129b095e-f7d0-4bcd-8129-0408a73a128f&pno=1030&arange=0

demo代码:

image-20200201211653254

获取直链失败,还是没有发出请求,加了刚才提到的两行不验证证书的代码还是不行

会不会是视频链接的问题?手动在浏览器的无痕模式打开看一下

image-20200201212020294

打不开,在有vip Cookie的浏览器打开也还是这样

获取直链的时候有带上Cookie和UA,所以不是Cookie和UA的问题,问题会不会出现在获取视频链接的时候?

验证:

0.php生成解析视频的接口链接,手动复制在带有无痕的情况下访问

image-20200201230921753

提示:

{"msg":"加密串校验参数错误","code":30003,"hint":1,"oper":1,"seqid":"01be15e822054bdfa579bdc4f24f1a80"}

1.php生成解析视频的接口链接,手动复制在带有Vip Cookie的情况下访问

image-20200201212551850

正常返回视频链接,证明调用解析视频链接的接口需要Vip Cookie

手动拼接蓝光的视频链接,再手动访问一下

视频链接:

https://web-disp.titan.mgtv.com/atcl?pm2=NI2x07kOH4~LHqrKae5ZifaIlPi7XUIdt_Mj9Asfzs1Wb~GMOET66G_DmvWm4tBI7Hpx_lgaDNeJCrZGYfaujmlMWXC_n_3aVUgLvN_7u8LWe~m0pvKctclzFO9ehMO50AmHHXQCLbgYpbnRsLrl2k8KxI6dZDaeJ6TMLFdOII6qIHo3Z5N8e2U5yPTL~tsPmLAqCrGaoBmkzRvvTrJk091t12OxXa65rnnxE5hrhaHXmUakCwS~s62PfK~xSFLhBDktQXcLvk3NMlt6SQvJnms0K0DrqUMkBRjHbVsz1QjPK2hkEM17Gay3ly2Ave6xiG7sfkpoMAq2_C5IDnW4ffC_5QusFopz0jY5mzubt_Qf0m1khSJsas0k2W4FaMntDYwLgJZmasSXvCRa7txxC9eln1Vh6CBbAKtFxzLky98v872XoRVMIaCtoT8Ctu1tITPha1xU7PvaoP6jm922c3cvVtNlBV~i73h0dPm_kOLRPPA7~aTMyv_i8Bog3mkjlJO~7zVgG5QVOUjdiALKZm8QBtVsF6qaUILne4LYVw6~Xc7ZtGW6sxuagu65kcUqIYACHa~Ny4KUCIYuVXMmiQ--&gsid=f850d0d8-0aaf-4043-9578-ed3893b91bbe&pno=1030&arange=0

image-20200201212912010能够获取到视频直链

image-20200201212856445

也能够正常播放

在无痕窗口试了一下也能获取到视频直链和正常播放

通过php获取的视频链接在带Cookie的浏览器也不能访问

但是用php拼接的解析视频接口在无痕窗口打开能够正常访问而且能够获取到视频直链

这就证明了是php在访问视频解析接口的时候出了问题

应该是模拟浏览器模仿得不够全面,但是Cookie和UA都有了,还差什么呢?

其实在到这里之前,在第一次因为链接是"https://"获取不到内容的时候我以为是本地环境的问题,就在加了两行不验证证书之前和之后把获取pm2的PHP传到了虚拟空间上面,加了那两行代码之后能获取到内容了,但是提示:

{"msg":"因版权限制, 该视频暂不提供本国家/地区播放","code":40005,"hint":1,"oper":1,"seqid":"ca9bb1374d6a4ec19153fe60dc9ccdf8"}

image-20200201215405232

逆向思路:

  1. 这个应该是根据访问者的ip来判断的
  2. 虚拟空间是香港的,中国食品应该只能允许中国内陆的用户观看,所以伪造一个中国内陆的ip来访问应该就可以了
  3. 既然要用到中国内陆的ip,自己通过浏览器又能正常访问接口,而且自己也经常用这个vip账号看视频,有基于一般视频平台都有检测分享vip账号的机制,为了避免以后程序在虚拟空间跑的时候ip和本地ip不一样被检测到而封号,所以索性用自己的ip,百度搜索"ip"得到的本机ip就是我们需要的ip

伪造来源ip就是通过头部信息来伪造,伪造ua也是通过头部信息来伪造的,所以把这伪造来源ip和ua的代码整合到$header,然后修改hs()函数

代码如下:

$header = array(
        'CLIENT-IP:119.135.65.168',
        'X-FORWARDED-FOR:119.135.65.168',
'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',
  
        );

function hs($url,$cookie,$header)
{
    $ch = curl_init();
$timeout = 0;
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_COOKIE, $cookie); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //不验证证书
curl_setopt($ch, CURLOPT_URL, $url);
$hs_content = curl_exec($ch);
    return $hs_content;
}

修改后的获取视频链接的php获取到的蓝光视频链接经手动拼接后如下:

https://web-disp.titan.mgtv.com//atcl?pm2=yMdlz~6NIdfBwh7KMfVzVieXKcyRJN3v3r3aMkyTWs9Tk4B5iQq2ZwUV09Y66N6VpCH~ST~MzL5P4XtsB8HkUsz_WvzXCQVN4J2LGT1nbHkF4FgFEd2ruE3pVn8FAw89v9JrKLvZhwSvc_1KtaGft6U~BoovHCmn72B7w~aqByEACfr2V_w~45g57TVkPG0BlHI4eIyxRLJJ4b24yebERnvzHNFuUCc6wbCHxW0SReDJyr7Wtq3AzjKIShdbv3aC2_X9PlKwGRJz0QLoWefeya3EcIof9MNSLHV_yGmP52tgos6CSZQmC28WOvq1cNW9iFSxbrD1RZRkx3F11kurhVNBs~qYcloRzzBUYUSVhJDGhU~gXE0NnDU3n9_TJ6TfBj1t0fbarWhDyYEc5bym9poK4uxrxteM6LYxM2eSyI8Pq3vLdRzdeB4ejTh27amTOEBsFIDu8vFyvdwv53F4O59gKmNZzRjox41qEKo4_Wej6j20Kvzt5g3XR9Do6RxpG4E6btu7~m80rv8RJs_io5AdtL20G2QgrOjB~WxLbgFCg9Qn~~6d9aFOvJk997YDmv2cHKl35j5RxGjcg1t8aQ--&gsid=248938d7-9f4e-4694-a93b-9318a8cac2e7&pno=1030&arange=0

修改后的获取视频直链的php,成功获取到视频直链

image-20200201221003469

image-20200201221046087

直链也是有效的,视频能够正常播放

Ps:

因为这篇总结是在已经完整逆向了一遍之后再重新逆向一次写的

第一次逆向的时候,到这个环节的时候,虽然能获取到视频的直链但是,直链是没有这个"pcvideo"的前缀的,idc也是不知道是什么idc的,不是阿里云腾讯的idc,虽然视频也能正常播放,但是无论是通过这个直链下载m3u8文件还是通过直链在线播放都是很卡很慢的

当时是这样解决的:

思考:

  1. 会不会是视频链接的问题,通过php获得视频链接,分别在无痕窗口和有Cookie的窗口打开,看看是否解析出高速的带"pcvideo"前缀的视频直链

测试结论:就算是在手机浏览器的无痕窗口也能获取出高速的带"pcvideo"前缀的视频直链

思考:

应该是模拟浏览器访问模拟得不像,但是Cookie、UA伪造的来源ip都有了,还缺什么呢?

浏览器上面抓到的数据目测都用上了,所以准备通过"Charles"抓取无痕窗口访问视频链接的数据

但是发现"Charles"不知道为什么抓取不了"https://"的数据就把"https://"改成了"http://"来抓取数据

把Curl请求复制出来方便分析

image-20200201225110604

Curl请求(手动排版了一下):

curl 
-H 'Host: web-disp.titan.mgtv.com' 
-H 'Upgrade-Insecure-Requests: 1' 
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' 
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' 
-H 'Accept-Language: zh-CN,zh;q=0.9' 
--compressed 'http://web-disp.titan.mgtv.com/atcl?pm2=NI2x07kOH4~LHqrKae5ZifaIlPi7XUIdt_Mj9Asfzs1Wb~GMOET66G_DmvWm4tBI7Hpx_lgaDNeJCrZGYfaujmlMWXC_n_3aVUgLvN_7u8LWe~m0pvKctclzFO9ehMO50AmHHXQCLbgYpbnRsLrl2k8KxI6dZDaeJ6TMLFdOII6qIHo3Z5N8e2U5yPTL~tsPmLAqCrGaoBmkzRvvTrJk091t12OxXa65rnnxE5hrhaHXmUakCwS~s62PfK~xSFLhBDktQXcLvk3NMlt6SQvJnms0K0DrqUMkBRjHbVsz1QjPK2hkEM17Gay3ly2Ave6xiG7sfkpoMAq2_C5IDnW4ffC_5QusFopz0jY5mzubt_Qf0m1khSJsas0k2W4FaMntDYwLgJZmasSXvCRa7txxC9eln1Vh6CBbAKtFxzLky98v872XoRVMIaCtoT8Ctu1tITPha1xU7PvaoP6jm922c3cvVtNlBV~i73h0dPm_kOLRPPA7~aTMyv_i8Bog3mkjlJO~7zVgG5QVOUjdiALKZm8QBtVsF6qaUILne4LYVw6~Xc7ZtGW6sxuagu65kcUqIYACHa~Ny4KUCIYuVXMmiQ--&gsid=f850d0d8-0aaf-4043-9578-ed3893b91bbe&pno=1030&arange=0'

image-20200201224950634

百度了一下这些应该都是头部信息,然后UA我们已经有了,现在只需要把图中标记出来,我们没有的头部信息补上去应该就可以了

补充之后的头部信息如下:

$header = array(
'Host: web-disp.titan.mgtv.com',
'CLIENT-IP:119.135.65.168',
'X-FORWARDED-FOR:119.135.65.168',
'Upgrade-Insecure-Requests: 1',
'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Language: zh-CN,zh;q=0.9',
        );

用新的头部信息测试之后就能解析出高速的带"pcvideo"前缀的视频直链了

获取视频直链的demo已经测试成功了,开始弄for遍历,生成各清晰度的视频直链

代码如下:

$analysis_json = json_decode($analysis_content, true);
$stream_domain = $analysis_json['data']['stream_domain'][0];
$video_list = '';
for ($i=0; $i<=count($analysis_json['data']['stream'])-1; $i++)
{
    $atcl_url = $stream_domain . $analysis_json['data']['stream'][$i]['url'];
    $atcl_content = hs($atcl_url,$cookie,$header);
    $atcl_json = json_decode($atcl_content, true);
    $video_url = $atcl_json['info'];
    $video_list = $video_list . $analysis_json['data']['stream'][$i]['name'] . ':' . $video_url . '
'; } echo $video_list;

image-20200201230518163

各清晰度的视频直链获取成功!!!

image-20200201230453089

复制视频直链测试播放成功!!!

因为之前逆向的目标都是同一个视频,为了测试逆向的通用性,这次把视频id换成了:7466805

然后运行就是一顿疯狂报错,然后把获取pm2的内容输出,把下面的代码暂时注释,来排错

image-20200201235259132

刚才还用得好好地,现在接口突然就提示错误了,分析了一下提交的参数

只有两个参数可疑,一个是did,另一个是ssuid,根据多次的抓包did应该是固定的,至少暂时是固定的,所以did没有问题,那一定就是suuid的问题了

只要把suuid的问题解决就ok了

问题是,对js代码不熟悉,找不到生成suuid的算法

在网上找到了解析某果TV视频的相关源码

在里面不仅找到了生成suuid的算法还找到了生成did的算法,而且这两个的算法居然是一样的.....

而且suuid和did居然是随机生成的...

生成suuid和did的算法:

//生成0到1随机数
    function random($min = 0, $max = 1){   
        return $min + mt_rand()/mt_getrandmax()*($max-$min);   
    }  
//生成did
    function createuuid($b, $a=null) {  
        switch ($a) {  
            case 'h':  
                $a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";  
                break;  
            case 's':  
                $a = "0123456789";  
                break;  
            case 'd':  
                $a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";  
                break;  
            case 'x':  
                $a = "abcdefghijklmnopqrstuvwxyz";  
                break;  
            default:  
                $a = "0123456789abcdef";  
                break;  
        }  
        $z = str_split($a);  
        for ($c='',$g=0; $g < $b; $g++) {   
            $c .= $z[ceil(100000000 * (random())) % count($z)];  
        }  
        return $c;  
    }  

把算法放进逆向程序php里面再测试一下

$suuid = createuuid(8) . "-" . createuuid(4) . "-" . createuuid(4) . "-" . createuuid(12);

image-20200202000408709

image-20200202000636454

成功播放!既然都有did的算发了,干脆把did也改成变量

$did = createuuid(8) . "-" . createuuid(4) . "-" . createuuid(4) . "-" . createuuid(12);

image-20200202000851125

不好意思,打扰了.....一运行就疯狂报错

image-20200202000952137

还是同样的味道,还是同样的错误代码671

但是再次测试的时候,did用之前的常量,suuid用现在算法生成的变量还是偶尔会出现上面的情况

但是把php拼接出来的接口链接就算是在无痕窗口打开也不会有问题,所以应该是curl的问题

重新抓了一次包,发现Cookie里面的__STKUUID和did的值是一样的

然后就把Cookie里面的__STKUUID的值改成了$did,但是偶尔还是提示671

最后多次排错,发现是$header里面的Host一直使用固定的值导致的

把Host改成自适应的变量就解决这个问题了

修改之后的代码如下:

function sj($content,$kt,$jw)
{
    $start = strpos($content,$kt,0) + strlen($kt);
    $end = strpos($content,$jw,$start);
    $length = $end - $start;
$sj_content = substr($content,$start,$length);
    return $sj_content;
}

function hs($url,$cookie,$header)
{
$ch = curl_init();
$timeout = 0;
$domain = sj($url,'//','/');
$header[count($header)] = 'Host: ' . $domain;
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_COOKIE, $cookie); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //不验证证书
curl_setopt($ch, CURLOPT_URL, $url);
$hs_content = curl_exec($ch);
    return $hs_content;
}

$header = array(
'CLIENT-IP:119.135.67.205',
'X-FORWARDED-FOR:119.135.67.205',
'Upgrade-Insecure-Requests: 1',
'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Language: zh-CN,zh;q=0.9',
        );

最后还发现$did和$suuid都可以用上面提到的算法生成,而且使用起来每次都会有欢迎提示信息显示

{
    "msg": "",
    "code": 200,
    "data": {
        "atc": {
            "pm2": "WVpQ6hNZZVLI93GYTct9QRk3esxYNF7fkO15Z9sOzMlWRdzBNB_tyEY2gGIAnQubuSSgGMaM1ZXnZi7_emuUhVBBWH6ojWQb0uPFCIXpjzkV1xi5jX68L9wYqWzLX1UvA_5vvZZmQbIvLdKtV9GCJYGUWda6QE5bMpH7IQbeiSuXqMALV19jCy1IcsHVVZMGhkDmHjRxuyVbcUoEDVL~GmK_hka3Dk7RSsfSchYCr8RDC7GdcbVXpfLdfWj30cNLjyrn5z87Uu8DINKhvt5SKQYRj4BMeajLy8NBwjsfTsM-",
            "tk2": "--AM9QHbixHOygzN3ETN0YDM4UTM9wWY2xXNwgjN2QzN9QWa2xHM9YXZyB3cpxXM9kXYwNXa8FTPwlmd"
        },
        "share": {
            "qq": "http://connect.qq.com/widget/shareqq/index.html?title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E7%89%B9%E8%AD%A6%E9%98%9F%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E&desc=%E5%9C%A8%E8%8A%92%E6%9E%9CTV%E4%B8%8A%E7%9C%8B%E8%A7%81%E8%BF%99%E6%9D%A1%E8%A7%86%E9%A2%91%E8%BF%98%E4%B8%8D%E9%94%99%E5%93%A6%EF%BC%9A%E7%89%B9%E8%AD%A6%E9%98%9F&site=%E8%8A%92%E6%9E%9CTV&url=http://www.mgtv.com/s/7466805.html%3Fdc%3D63f7cef7-9699-417a-b86b-65ab5e86277a%26cxid%3D90fe36tp1&tpa=dW5pb25faWQ9MTAzMjUyXzEwMDAwMV8wMV8wMQ",
            "weixin": "https://www.mgtv.com/share/weixin/?url=http://www.mgtv.com/s/7466805.html%3Fdc%3Db577c3aa-6730-4d81-840c-60ec7d1cca12&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E7%89%B9%E8%AD%A6%E9%98%9F%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E",
            "weibo": "http://service.weibo.com/share/share.php?appkey=152400019&url=http://www.mgtv.com/s/7466805.html%3Fdc%3De749365b-be4f-4f5e-8f1c-d3679edc1811%26cxid%3D94f9tkogo&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E7%89%B9%E8%AD%A6%E9%98%9F%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E&content=utf-8&pic=https://1img.hitv.com/preview/sp_images/2020/1/23/dianying/327079/7466805/20200123184631380.jpg",
            "qzone": "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http://www.mgtv.com/s/7466805.html%3Fdc%3D2abefdc8-173f-4f78-8639-fb489b612db3%26cxid%3D90fe36tp1&title=%E6%88%91%E6%AD%A3%E5%9C%A8+%40%E8%8A%92%E6%9E%9CTV+%E7%9C%8B%E3%80%90%E7%89%B9%E8%AD%A6%E9%98%9F%E3%80%91%E5%B0%8F%E4%BC%99%E4%BC%B4%E4%BB%AC%E9%80%9F%E5%BA%A6%E5%9B%B4%E8%A7%82%E4%BA%86%7E",
            "dc": "aee8fe42-c001-4419-980b-de9cd320c7d9"
        },
        "user": {
            "uid": "6627057",
            "ticket": "",
            "iplimit": "0",
            "ip": "119.135.67.205",
            "nickname": "mg39941278kFdk",
            "login": true,
            "purview": "200",
            "uuid": "d5d8c8f64fa14018a9c5b6b7921023cb",
            "mac": "6955886e-62dc-7394-d371e5fef31f",
            "cxid": "1580354708471",
            "isvip": "1"
        },
        "stream_quality": {
            "default_quality_force": "-999",
            "default_quality": "-999"
        },
        "drm": {
            "drmFirm": "",
            "drmType": "",
            "licenseUrl": ""
        },
        "frame": {
            "images": [
                "https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_1.jpg",
                "https://1img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_2.jpg",
                "https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_3.jpg",
                "https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_4.jpg",
                "https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_5.jpg",
                "https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_6.jpg",
                "https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_7.jpg",
                "https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_8.jpg",
                "https://2img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_9.jpg",
                "https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_10.jpg",
                "https://1img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_11.jpg",
                "https://3img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_12.jpg",
                "https://0img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_13.jpg",
                "https://4img.hitv.com/preview/frame_images/pcframes/2020/dianying/101935/5649617/37615683_178x100_14.jpg"
            ],
            "imgSize": "178*100",
            "second": [
                "0|4|9|14|19|24|29|34|39|44|49|54|59|64|69|74|79|84|89|94|99|104|109|114|119|124|129|134|139|144|149|154|159|164|169|174|179|184|189|194|199|204|209|214|219|224|229|234|239|244|249|254|259|264|269|274|279|284|289|294|299|304|309|314|319|324|329|334|339|344|349|354|359|364|369|374|379|384|389|394|399|404|409|414|419|424|429|434|439|444|449|454|459|464|469|474|479|484|489|494",
                "499|504|509|514|519|524|529|534|539|544|549|554|559|564|569|574|579|584|589|594|599|604|609|614|619|624|629|634|639|644|649|654|659|664|669|674|679|684|689|694|699|704|709|714|719|724|729|734|739|744|749|754|759|764|769|774|779|784|789|794|799|804|809|814|819|824|829|834|839|844|849|854|859|864|869|874|879|884|889|894|899|904|909|914|919|924|929|934|939|944|949|954|959|964|969|974|979|984|989|994",
                "999|1004|1009|1014|1019|1024|1029|1034|1039|1044|1049|1054|1059|1064|1069|1074|1079|1084|1089|1094|1099|1104|1109|1114|1119|1124|1129|1134|1139|1144|1149|1154|1159|1164|1169|1174|1179|1184|1189|1194|1199|1204|1209|1214|1219|1224|1229|1234|1239|1244|1249|1254|1259|1264|1269|1274|1279|1284|1289|1294|1299|1304|1309|1314|1319|1324|1329|1334|1339|1344|1349|1354|1359|1364|1369|1374|1379|1384|1389|1394|1399|1404|1409|1414|1419|1424|1429|1434|1439|1444|1449|1454|1459|1464|1469|1474|1479|1484|1489|1494",
                "1499|1504|1509|1514|1519|1524|1529|1534|1539|1544|1549|1554|1559|1564|1569|1574|1579|1584|1589|1594|1599|1604|1609|1614|1619|1624|1629|1634|1639|1644|1649|1654|1659|1664|1669|1674|1679|1684|1689|1694|1699|1704|1709|1714|1719|1724|1729|1734|1739|1744|1749|1754|1759|1764|1769|1774|1779|1784|1789|1794|1799|1804|1809|1814|1819|1824|1829|1834|1839|1844|1849|1854|1859|1864|1869|1874|1879|1884|1889|1894|1899|1904|1909|1914|1919|1924|1929|1934|1939|1944|1949|1954|1959|1964|1969|1974|1979|1984|1989|1994",
                "1999|2004|2009|2014|2019|2024|2029|2034|2039|2044|2049|2054|2059|2064|2069|2074|2079|2084|2089|2094|2099|2104|2109|2114|2119|2124|2129|2134|2139|2144|2149|2154|2159|2164|2169|2174|2179|2184|2189|2194|2199|2204|2209|2214|2219|2224|2229|2234|2239|2244|2249|2254|2259|2264|2269|2274|2279|2284|2289|2294|2299|2304|2309|2314|2319|2324|2329|2334|2339|2344|2349|2354|2359|2364|2369|2374|2379|2384|2389|2394|2399|2404|2409|2414|2419|2424|2429|2434|2439|2444|2449|2454|2459|2464|2469|2474|2479|2484|2489|2494",
                "2499|2504|2509|2514|2519|2524|2529|2534|2539|2544|2549|2554|2559|2564|2569|2574|2579|2584|2589|2594|2599|2604|2609|2614|2619|2624|2629|2634|2639|2644|2649|2654|2659|2664|2669|2674|2679|2684|2689|2694|2699|2704|2709|2714|2719|2724|2729|2734|2739|2744|2749|2754|2759|2764|2769|2774|2779|2784|2789|2794|2799|2804|2809|2814|2819|2824|2829|2834|2839|2844|2849|2854|2859|2864|2869|2874|2879|2884|2889|2894|2899|2904|2909|2914|2919|2924|2929|2934|2939|2944|2949|2954|2959|2964|2969|2974|2979|2984|2989|2994",
                "2999|3004|3009|3014|3019|3024|3029|3034|3039|3044|3049|3054|3059|3064|3069|3074|3079|3084|3089|3094|3099|3104|3109|3114|3119|3124|3129|3134|3139|3144|3149|3154|3159|3164|3169|3174|3179|3184|3189|3194|3199|3204|3209|3214|3219|3224|3229|3234|3239|3244|3249|3254|3259|3264|3269|3274|3279|3284|3289|3294|3299|3304|3309|3314|3319|3324|3329|3334|3339|3344|3349|3354|3359|3364|3369|3374|3379|3384|3389|3394|3399|3404|3409|3414|3419|3424|3429|3434|3439|3444|3449|3454|3459|3464|3469|3474|3479|3484|3489|3494",
                "3499|3504|3509|3514|3519|3524|3529|3534|3539|3544|3549|3554|3559|3564|3569|3574|3579|3584|3589|3594|3599|3604|3609|3614|3619|3624|3629|3634|3639|3644|3649|3654|3659|3664|3669|3674|3679|3684|3689|3694|3699|3704|3709|3714|3719|3724|3729|3734|3739|3744|3749|3754|3759|3764|3769|3774|3779|3784|3789|3794|3799|3804|3809|3814|3819|3824|3829|3834|3839|3844|3849|3854|3859|3864|3869|3874|3879|3884|3889|3894|3899|3904|3909|3914|3919|3924|3929|3934|3939|3944|3949|3954|3959|3964|3969|3974|3979|3984|3989|3994",
                "3999|4004|4009|4014|4019|4024|4029|4034|4039|4044|4049|4054|4059|4064|4069|4074|4079|4084|4089|4094|4099|4104|4109|4114|4119|4124|4129|4134|4139|4144|4149|4154|4159|4164|4169|4174|4179|4184|4189|4194|4199|4204|4209|4214|4219|4224|4229|4234|4239|4244|4249|4254|4259|4264|4269|4274|4279|4284|4289|4294|4299|4304|4309|4314|4319|4324|4329|4334|4339|4344|4349|4354|4359|4364|4369|4374|4379|4384|4389|4394|4399|4404|4409|4414|4419|4424|4429|4434|4439|4444|4449|4454|4459|4464|4469|4474|4479|4484|4489|4494",
                "4499|4504|4509|4514|4519|4524|4529|4534|4539|4544|4549|4554|4559|4564|4569|4574|4579|4584|4589|4594|4599|4604|4609|4614|4619|4624|4629|4634|4639|4644|4649|4654|4659|4664|4669|4674|4679|4684|4689|4694|4699|4704|4709|4714|4719|4724|4729|4734|4739|4744|4749|4754|4759|4764|4769|4774|4779|4784|4789|4794|4799|4804|4809|4814|4819|4824|4829|4834|4839|4844|4849|4854|4859|4864|4869|4874|4879|4884|4889|4894|4899|4904|4909|4914|4919|4924|4929|4934|4939|4944|4949|4954|4959|4964|4969|4974|4979|4984|4989|4994",
                "4999|5004|5009|5014|5019|5024|5029|5034|5039|5044|5049|5054|5059|5064|5069|5074|5079|5084|5089|5094|5099|5104|5109|5114|5119|5124|5129|5134|5139|5144|5149|5154|5159|5164|5169|5174|5179|5184|5189|5194|5199|5204|5209|5214|5219|5224|5229|5234|5239|5244|5249|5254|5259|5264|5269|5274|5279|5284|5289|5294|5299|5304|5309|5314|5319|5324|5329|5334|5339|5344|5349|5354|5359|5364|5369|5374|5379|5384|5389|5394|5399|5404|5409|5414|5419|5424|5429|5434|5439|5444|5449|5454|5459|5464|5469|5474|5479|5484|5489|5494",
                "5499|5504|5509|5514|5519|5524|5529|5534|5539|5544|5549|5554|5559|5564|5569|5574|5579|5584|5589|5594|5599|5604|5609|5614|5619|5624|5629|5634|5639|5644|5649|5654|5659|5664|5669|5674|5679|5684|5689|5694|5699|5704|5709|5714|5719|5724|5729|5734|5739|5744|5749|5754|5759|5764|5769|5774|5779|5784|5789|5794|5799|5804|5809|5814|5819|5824|5829|5834|5839|5844|5849|5854|5859|5864|5869|5874|5879|5884|5889|5894|5899|5904|5909|5914|5919|5924|5929|5934|5939|5944|5949|5954|5959|5964|5969|5974|5979|5984|5989|5994",
                "5999|6004|6009|6014|6019|6024|6029|6034|6039|6044|6049|6054|6059|6064|6069|6074|6079|6084|6089|6094|6099|6104|6109|6114|6119|6124|6129|6134|6139|6144|6149|6154|6159|6164|6169|6174|6179|6184|6189|6194|6199|6204|6209|6214|6219|6224|6229|6234|6239|6244|6249|6254|6259|6264|6269|6274|6279|6284|6289|6294|6299|6304|6309|6314|6319|6324|6329|6334|6339|6344|6349|6354|6359|6364|6369|6374|6379|6384|6389|6394|6399|6404|6409|6414|6419|6424|6429|6434|6439|6444|6449|6454|6459|6464|6469|6474|6479|6484|6489|6494",
                "6499|6504|6509|6514|6519|6524|6529|6534|6539|6544|6549|6554|6559|6564|6569|6574|6579|6584"
            ]
        },
        "points": {
            "start": "51|片头",
            "end": "6417|片尾",
            "content": []
        },
        "info": {
            "authInfo": {
                "interests_info": {
                    "play_tips": {
                        "report": "https://vip.log.mgtv.com/dynamic_entry.html?source=vod_play&invoker=pcweb&version=1.4.1&did=6955886e-62dc-7394-d371e5fef31f&uuid=d5d8c8f64fa14018a9c5b6b7921023cb&vid=&cid=0&chnid=&plid=&plan_id=1052&exp=&creativity_id=1052&type=show",
                        "icon": "",
                        "text": "尊敬的V1会员,您正在观看VIP尊享内容"
                    },
                    "def_tips": {
                        "suites": [
                            {
                                "entry_text": "尊敬的V1会员,正在为您切换VIP专享#def#画质",
                                "def": -1,
                                "report": "https://vip.log.mgtv.com/dynamic_entry.html?source=vod_vip_defs&invoker=pcweb&version=1.4.1&did=6955886e-62dc-7394-d371e5fef31f&uuid=d5d8c8f64fa14018a9c5b6b7921023cb&vid=&cid=0&chnid=&plid=&plan_id=1051&exp=&creativity_id=1051&type=show",
                                "icon": "",
                                "finish_text": "尊敬的V1会员,已为您切换VIP专享#def#画质"
                            },
                            {
                                "entry_text": "尊敬的V1会员,正在为您切换VIP专享#def#音质",
                                "def": 5,
                                "report": "https://vip.log.mgtv.com/dynamic_entry.html?source=vod_vip_defs&invoker=pcweb&version=1.4.1&did=6955886e-62dc-7394-d371e5fef31f&uuid=d5d8c8f64fa14018a9c5b6b7921023cb&vid=&cid=0&chnid=&plid=&plan_id=1051&exp=&creativity_id=1051&type=show",
                                "icon": "",
                                "finish_text": "尊敬的V1会员,已为您切换VIP专享#def#音质"
                            }
                        ]
                    }
                }
            },
            "buytips": "",
            "clipLimit": 0,
            "clip_type": "1",
            "collection_id": "327079",
            "collection_name": "",
            "desc": "贾乃亮凌潇肃守护城市安全",
            "drm": null,
            "drmFlag": "0",
            "duration": "6588",
            "keepPlay": null,
            "keepPlayType": 0,
            "paymark": "1",
            "playlist_id": "",
            "playlist_name": "",
            "price_novip": "",
            "price_vip": "",
            "root_id": "3",
            "series": "第 1 集",
            "series_id": "0",
            "starPointFlag": "0",
            "thumb": "https://1img.hitv.com/preview/sp_images/2020/1/23/dianying/327079/7466805/20200123184631380.jpg",
            "tips": null,
            "title": "特警队",
            "trialtime": "300",
            "url": "https://www.mgtv.com/s/7466805.html",
            "video_id": "7466805",
            "watchTime": 0
        }
    },
    "seqid": "44dd7a020a064551bd8b8781362cfd62"
}

image-20200202200748737

非常Nice!!

Cookie参数太长,去除多余的参数试一下

HDCN 没有改参数,就不解析蓝光链接

Screenshot_1580648054

换多几个视频进行测试,无论是vip综艺还是vip电影全部都解析成功!!!

逆向成功!!!大功告成!!!

Tips:

1.Vip用券电影只能在app播放,所以无法解析

2.本次逆向非无VIP也可解析vip电影,需要vip账号cookie才可解析vip电影

//paymark为0时代表该影片为免费影片,vip影片为1
$pm2_json['data']['info']['paymark']
//isvip为0是代表当前账号为非会员
$pm2_json['data']['user']['isvip']
最后修改:2020 年 02 月 01 日
如果觉得我的文章对你有用,请随意赞赏