le.com 算法很简单tkey,网站里搞的挺复杂,精简出来就这么点
time = new Date().valueOf() /1e3;
var Key = {
getMmsKey: function(e) {
var t = 185025305
, r = 8
, n = e;
n = this['rotateRight'](n, r);
var o = n ^ t;
return o
},
rotateRight: function(e, t) {
for (var r, n = 0; t > n; n++)
r = 1 & e,
e >>= 1,
r <<= 31,
e += r;
return e
},
};
console.log(Key.getMmsKey(time));
http://player-pc.le.com/mms/out/video/playJson.json?platid=1&splatid=107&tss=no&id=20120646&detect=0&dvtype=1000&accessyx=1&domain=m.le.com&tkey=1046870637&devid=1b79ead4a2453c21bffda579b02c4b91&source=1001&lang=cn®ion=cn&isHttps=0
取地址 拼接
&format=1&expect=3&p1=0&p2=04&termid=2&ostype=android&hwtype=un&uuid=1318364647644569&vid=20120646&fky=12345&tzm=208009836&
请求携带来路,就能轻松获取真实地址了
php算法
function getMmsKey($e) {
$t = 185025305;
$r = 8;
$n = $e;
$n = rotateRight($n, $r);
$o = $n^$t;
return $o;
}
function rotateRight($e, $t) {
for ($r, $n = 0; $t>$n; $n++) {
$r = 1 & $e;
$e >>= 1;
$r <<= 31;
$e += $r;
}
return $e;
} |