コード例 #1
0
    return $_loc2_ . $_loc3_;
}
function method_3($n)
{
    $x = $i = 0;
    $s = "";
    $str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
    while ($i < $n) {
        $x = mt_rand(0, strlen($str));
        $s .= substr($str, $x, 1);
        $i++;
    }
    return $s;
}
function getHashCash($tokenvv)
{
    while (substr(sha1($tokenvv . $s, true), 0, 2) != "og") {
        $s = method_3(16);
    }
    return $s;
}
$sidtoken = ee("becaf9be", base64_decode($json12->data->security->encrypt_string));
$sid = explode("_", $sidtoken)[0];
$token = explode("_", $sidtoken)[1];
$tokenvv = $json10->data->token->vv;
$tokenup = $json10->data->token->up;
$hashcash = getHashCash($tokenvv . "o");
$post = "videoid={$v}&url={$topenlace}&sid={$sid}&referer=null&uid=0&totalseg=&totalsec=&h={$hashcash}&fullflag=0&t={$tokenvv}&ikuflag=u1%5Fm1&source=video";
$call = "http://stat.youku.com/player/addPlayerStaticReport";
$stat = curl_proxy($call, "", "", $headers, 1, $post, 0, $cookie);
$cookie .= getcookie($stat, "_f");
コード例 #2
0
ファイル: daisuki.php プロジェクト: denobisipsis/adownloader
// here you find the public pem key
$libs = "http://www.daisuki.net/etc/designs/daisuki/clientlibs_anime_watch.min.js";
$headers = array("User-Agent: \t\tandroid", "Accept: */*", "Connection: \t\tkeep-alive", "Accept-Encoding: \t");
$publickeypem = trim(extrae(curl_proxy($libs, "", $topenlace, $headers), 'var publickeypem', '"', '"'));
// after extracted the public pem key must be fixed
$publickeypem = hex2bin(str_replace("5c6e", "0a", bin2hex($publickeypem)));
/* 

we need to make a call with parameters 
e-> url
a-> local key rsa encrypted with public pem key
d-> api_parameters from flashvars aes_encrypted with local key
c-> language/Region
*/
$ClavePublica = openssl_pkey_get_public($publickeypem);
openssl_public_encrypt($key, $encrypted, $ClavePublica);
$a = urlencode(base64_encode($encrypted));
$api_params["s"] = extrae($contenth, "'s'", ':"', '"');
$api_params["mv_id"] = extrae($contenth, '"mv_id"', ':"', '"');
$api_params["device_cd"] = extrae($contenth, '"device_cd"', ':"', '"');
$api_params["ss1_prm"] = extrae($contenth, '"ss1_prm"', ':"', '"');
$api_params["ss2_prm"] = extrae($contenth, '"ss2_prm"', ':"', '"');
$api_params["ss3_prm"] = extrae($contenth, '"ss3_prm"', ':"', '"');
$d = urlencode(base64_encode(mcrypt_cbc(MCRYPT_RIJNDAEL_128, $key, json_encode($api_params), MCRYPT_ENCRYPT)));
// we make the call to get a json with rtn encrypted, to aes_decrypt with local key
$rtn = json_decode(curl_proxy("http://www.daisuki.net/bin/bgn/init?e=" . urlencode($topenlace) . "&d={$d}&s=ServerControlled&a={$a}&c=" . $api_params["ss3_prm"], "", "", $headers));
$rtn = $rtn->rtn;
$f4m = json_decode(trim(mcrypt_cbc(MCRYPT_RIJNDAEL_128, $key, base64_decode($rtn), MCRYPT_DECRYPT, "")));
// we obtain an adobe hds manifest downloadable with AdobeHDS.php by KSV. All mechanized in Adownloader
$f4m = $f4m->play_url . "&hdcore=2.10.3&g=UPEJFFLSWBFW";
exit;