06
2018
03

CNTV 算最近又变了,今天我把新算法帖出来给大家学习学习。

之前的算法 http://ttzx.tv/post/32.html


调度接口

http://vdn.live.cntv.cn/api2/live.do?channel=pa://cctv_p2p_hdcctv1&client=cboxbox


拿到AUTH值.


cntv.php?type=pc&auth=[CNTV拿到的值]


现在新算法。

<?php

$toStr = "";

if (!empty($_GET['type']) && !empty($_GET['auth'])) {

$tm = time() / 86400;

$ctype = $_GET['type'];

$auth = trim($_GET['auth']);

$token = "cntv0003gvmhuthq";

if ("flash" == $ctype) {

$token = "cntv0005qaebbvgh";

$data = file_get_contents(dirname(__FILE__)."/cntv_flash.png");

$pos = (($tm ^ 4412365391) + 8195461905) % 4096;

} else if ("pc" == $ctype) {

$token = "cntv0004vgtzvlwd";

$data = file_get_contents(dirname(__FILE__)."/cntv_pc.png");

$pos = (($tm ^ 0xC571BFC4) + 2327821753) % 4096;

} else {

$data = file_get_contents(dirname(__FILE__)."/cntv_android.png");

$pos = (($tm ^ 2855868117) + 1098514689) % 4096;

}

$mstr = substr($data, 256 + $pos * 16, 16);

$key = openssl_decrypt($mstr, 'AES-128-ECB', "13Abde%6@UdwerPh", 3);

$enstr = openssl_encrypt(base64_decode($auth), 'AES-128-ECB', $key, 3);

$toStr = "{\"data\":\"".$token.base64_encode($enstr)."\"}";

}

exit($toStr);




图片密钥地址 http://ttzx.tv/img/cntv_flash.png http://ttzx.tv/img/cntv_pc.png http://ttzx.tv/img/cntv_android.png



« 上一篇 下一篇 »