My-Proxy Forum
Proxy Help => Web Proxies => Topic started by: forcemdt on July 21, 2012, 09:23:49 PM
-
proxy.org premium youtube plugin code crack
http://proxy.org/forum/plugins/7729-premium-youtube-plugin-better-compatibility-offload-youtube-bandwidth.html
Nick user new system
cant buy maybe i publish crack system
youtube.com.php
<?php
function getID( $key )
{
return substr( hash( "sha256", $key.$_SERVER['REMOTE_ADDR'] ), 48 );
}
function getAddr( $url, $id, $key )
{
return rawurlencode( arcfour( "encrypt", hash( "sha256", $key.$id ), $url ) );
}
function getCookie( )
{
global $toSet;
global $CONFIG;
if ( isset( $toSet[CURLOPT_COOKIE] ) )
{
return rawurlencode( base64_encode( $toSet[CURLOPT_COOKIE] ) );
}
if ( $CONFIG['cookies_on_server'] )
{
$lines = explode( "\n", file_get_contents( $toSet[CURLOPT_COOKIEFILE] ) );
$cookieData = "";
foreach ( $lines as $line )
{
if ( isset( $line[0] ) && substr_count( $line, "\t" ) == 6 && stripos( $line, ".youtube.com" ) !== false )
{
$tokens = explode( "\t", $line );
$tokens = array_map( "trim", $tokens );
$cookieData .= $tokens[5]."=".$tokens[6]."; ";
}
}
$cookieData = trim( $cookieData );
return rawurlencode( base64_encode( trim( $cookieData ) ) );
}
return "";
}
function youtubeURL( $url, $quality )
{
global $pluginConfig;
global $toLoad;
if ( !isset( $pluginConfig['customSubdomain'] ) )
{
$pluginConfig['customSubdomain'] = "get.otcdn.com";
}
$id = getid( $pluginConfig['licenseKey'] );
return "http://".$pluginConfig['customSubdomain']."/?access=".$pluginConfig['accessKey']."&id=".$id."&ip=".rawurlencode( base64_encode( $_SERVER['REMOTE_ADDR'] ) )."&addr=".getaddr( $url, $id, $pluginConfig['licenseKey'] )."&q=".$quality."&refer=".rawurlencode( arcfour( "encrypt", hash( "sha256", $pluginConfig['licenseKey'].$id ), $toLoad ) )."&cookie=".getcookie( );
}
function preParse( $input, $type )
{
global $video;
global $token;
global $videoPage;
global $pluginConfig;
switch ( $type )
{
case "html" :
$hash = hash( "sha256", $pluginConfig['licenseKey']."nv8Pqe7O" );
$i = 0;
while ( $i < 5 )
{
if ( $hash[$i] != "0" )
{
exit( "Invalid license key" );
}
++$i;
}
$input = preg_replace( "/".preg_quote( "<noscript>Hello, you either have JavaScript turned off or an old version of Adobe's Flash Player. <a href=\"http://www.adobe.com/go/getflashplayer/\">Get the latest Flash player</a>.</noscript>", "/" )."/s", "", $input );
$input = preg_replace( "/".preg_quote( "yt.www.watch.player.write(\"watch-player-div\", false, null, null, \"100%\", \"100%\");" )."/s", "", $input );
$input = preg_replace( "/".preg_quote( "document.write('Hello, you either have JavaScript turned off or an old version of Adobe\\'s Flash Player. <a href=\\\"http://www.adobe.com/go/getflashplayer/\\\">Get the latest Flash player</a>.');", "/" )."/s", "", $input );
if ( isset( $ytarr['url_encoded_fmt_stream_map'] ) )
{
if ( preg_match_all( "#url%3D(.*?)%26quality#", $ytarr['url_encoded_fmt_stream_map'], $url, PREG_SET_ORDER ) )
{
$id = array( );
foreach ( $url as $check )
{
if ( preg_match( "#itag%253D(.*?)%2526#", $check[1], $num ) )
{
$id[$num[1]] = $check[1];
}
}
$video[5] = isset( $id[37] ) ? rawurldecode( rawurldecode( $id[37] ) ) : false;
$video[4] = isset( $id[22] ) ? rawurldecode( rawurldecode( $id[22] ) ) : false;
$video[3] = isset( $id[35] ) ? rawurldecode( rawurldecode( $id[35] ) ) : false;
$video[2] = isset( $id[34] ) ? rawurldecode( rawurldecode( $id[34] ) ) : false;
$video[2] = isset( $id[18] ) && $video[2] === false ? rawurldecode( rawurldecode( $id[18] ) ) : $video[2];
$video[1] = isset( $id[6] ) ? rawurldecode( rawurldecode( $id[6] ) ) : false;
$video[1] = isset( $id[5] ) && $video[1] === false ? rawurldecode( rawurldecode( $id[5] ) ) : $video[1];
$video[1] = isset( $id[36] ) && $video[1] === false ? rawurldecode( rawurldecode( $id[36] ) ) : $video[1];
$video[1] = isset( $id[17] ) && $video[1] === false ? rawurldecode( rawurldecode( $id[17] ) ) : $video[1];
$video[1] = isset( $id[13] ) && $video[1] === false ? rawurldecode( rawurldecode( $id[13] ) ) : $video[1];
$videoPage = true;
}
}
else if ( preg_match( "#url_encoded_fmt_stream_map[\"']:\\s*[\"']([^\"'\\s]*)#", $input, $urlMap ) )
{
$urlMap[1] = preg_replace( "#\\\\u0026#s", "&", $urlMap[1] );
if ( preg_match_all( "#url=(.*?)&#", $urlMap[1], $url, PREG_SET_ORDER ) )
{
$id = array( );
foreach ( $url as $check )
{
if ( preg_match( "#itag%3D(.*?)%26#", $check[1], $num ) )
{
$id[$num[1]] = $check[1];
}
}
$video[5] = isset( $id[37] ) ? rawurldecode( $id[37] ) : false;
$video[4] = isset( $id[22] ) ? rawurldecode( $id[22] ) : false;
$video[3] = isset( $id[35] ) ? rawurldecode( $id[35] ) : false;
$video[2] = isset( $id[34] ) ? rawurldecode( $id[34] ) : false;
$video[2] = isset( $id[18] ) && $video[2] === false ? rawurldecode( $id[18] ) : $video[2];
$video[1] = isset( $id[6] ) ? rawurldecode( $id[6] ) : false;
$video[1] = isset( $id[5] ) && $video[1] === false ? rawurldecode( $id[5] ) : $video[1];
$video[1] = isset( $id[36] ) && $video[1] === false ? rawurldecode( $id[36] ) : $video[1];
$video[1] = isset( $id[17] ) && $video[1] === false ? rawurldecode( $id[17] ) : $video[1];
$video[1] = isset( $id[13] ) && $video[1] === false ? rawurldecode( $id[13] ) : $video[1];
$videoPage = true;
}
}
else
{
$videoPage = false;
}
$input = preg_replace( "#<img[^>]*data-thumb=#s", "<img alt=\"Thumbnail\" src=", $input, 0 - 1 );
$input = preg_replace( "#<iframe id=\"ad_.*?</div>#s", " </div>", $input, 1 );
$input = preg_replace( "#\"0\"</i#s", "\"0\"></i", $input, 1 );
$input = preg_replace( "#<div class=\"yt-alert yt-alert-default yt-alert-error.*?</div></div>#s", "", $input, 1 );
if ( !preg_match( "#'XSRF_TOKEN': '(.*?)'#", $input, $tok ) )
{
break;
}
$token = $tok[1];
}
return $input;
}
function postParse( $input, $type )
{
global $video;
global $token;
global $pluginConfig;
global $videoPage;
switch ( $type )
{
case "html" :
$input = preg_replace_callback( "#\"href=\"(.*?)\"#s", create_function( "\$matches", "return '\"href=\"' . proxyURL(\$matches[1]) . '\"';" ), $input, 0 - 1 );
if ( $videoPage )
{
if ( $pluginConfig['userQuality'] && isset( $_GET['quality'] ) )
{
switch ( $_GET['quality'] )
{
case "5" :
$quality = 5;
break;
case "4" :
$quality = 4;
break;
case "3" :
$quality = 3;
break;
case "2" :
$quality = 2;
break;
case "1" :
}
$quality = 1;
break;
$quality = $pluginConfig['defaultQuality'];
break;
}
else
{
$quality = $pluginConfig['defaultQuality'];
}
if ( $video[$quality] !== false )
{
$url = $video[$quality];
}
else
{
while ( 1 < $quality )
{
--$quality;
if ( !( $video[$quality] !== false ) )
{
continue;
}
$url = $video[$quality];
break;
break;
}
if ( !isset( $url ) && $video[$pluginConfig['defaultQuality'] + 1] !== false )
{
$quality = $pluginConfig['defaultQuality'] + 1;
$url = $video[$quality];
}
else if ( !isset( $url ) )
{
$url = null;
}
}
$auto = $pluginConfig['autoPlay'] ? "true" : "false";
$buffer = $pluginConfig['autoBuffer'] ? "true" : "false";
$url = rawurlencode( youtubeurl( $url, $quality ) );
$playerHTML = "\t\t\t\t\t<embed src=\"{$pluginConfig['playerURL']}\"\r\n\t\t\t\t\twidth=\"640\"\r\n\t\t\t\t\theight=\"360\"\r\n\t\t\t\t\tid=\"FlowPlayer\"\r\n\t\t\t\t\tname=\"FlowPlayer\"\r\n\t\t\t\t\tallowscriptaccess=\"always\"\r\n\t\t\t\t\tallowfullscreen=\"true\"\r\n\t\t\t\t\ttype=\"application/x-shockwave-flash\"\r\n\t\t\t\t\tpluginspage=\"http://www.macromedia.com/go/getflashplayer\" \r\n\t\t\t\t\tflashvars=\"id=FlowPlayer&config={'canvas':{'backgroundColor':'#000000','backgroundGradient':'none'},'clip':{'autoPlay':{$auto},'autoBuffering':{$buffer},'url':'{$url}','scaling':'fit'}}\" />";
if ( $pluginConfig['userQuality'] )
{
$playerHTML .= "<br /><br /><b>Select quality:</b>".( $video[5] && $quality != 5 ? " <a href=\"".$_SERVER['REQUEST_URI']."&quality=5\">1080p</a>" : "" ).( $quality == 5 ? " 1080p" : "" ).( $video[4] && $quality != 4 ? " <a href=\"".$_SERVER['REQUEST_URI']."&quality=4\">720p</a>" : "" ).( $quality == 4 ? " 720p" : "" ).( $video[3] && $quality != 3 ? " <a href=\"".$_SERVER['REQUEST_URI']."&quality=3\">480p</a>" : "" ).( $quality == 3 ? " 480p" : "" ).( $video[2] && $quality != 2 ? " <a href=\"".$_SERVER['REQUEST_URI']."&quality=2\">360p</a>" : "" ).( $quality == 2 ? " 360p" : "" ).( $video[1] && $quality != 1 ? " <a href=\"".$_SERVER['REQUEST_URI']."&quality=1\">240p</a>" : "" ).( $quality == 1 ? " 240p" : "" );
}
$input = preg_replace( "#<div id=\"watch-player\".*?<div id=\"watch-video-extra\">#s", "<div>{$playerHTML}</div><div id=\"watch-video-extra\">", $input, 1 );
$input = preg_replace( "#<div class=\"channels-video-player.*?</div>#s", "<div>{$playerHTML}</div>", $input, 1 );
$input = preg_replace( "#<div class=\"video-container\">.*?</div></button>#s", "", $input, 1 );
}
$input = preg_replace( "#<input type=\"submit\" name=\"submit\" value=\"Submit\">#s", "<input type=\"submit\" name=\"submit\" value=\"Submit\">\n <input type=\"hidden\" name=\"session_token\" value=\"{$token}\">", $input );
}
return $input;
}
include( GLYPE_ROOT."/plugins/pluginConfig.php" );
if ( !function_exists( "arcfour" ) )
{
exit( "This plugin requires the arcfour function (included with Glype version 1.4 or later)" );
}
$options['removeScripts'] = true;
$CONFIG['queue_transfers'] = false;
$video = array( );
$token = "";
$videoPage = false;
?>
pluginConfig.php
<?php
// Enter your license key between these single quotes
$pluginConfig['licenseKey'] = 'your-license-key-here';
// Enter your access key between these single quotes
$pluginConfig['accessKey'] = 'your-access-key-here';
// Location of the video player. Change this if you move the player
$pluginConfig['playerURL'] = GLYPE_URL . '/plugins/flowplayer-3.2.12.swf';
// Auto play videos when the page loads (true) or not (false)
$pluginConfig['autoPlay'] = true;
// Automatically start buffering the video on page load (always true when autoPlay is true)
$pluginConfig['autoBuffer'] = true;
// Allow the user to change the quality (true) or not (false)
$pluginConfig['userQuality'] = true;
/********************************************************************
Video quality options. Better quality (higher numbers) consumes more
bandwidth and may load slowly for users on slow internet connections.
1 = 240p
2 = 360p
3 = 480p
4 = 720p
5 = 1080p
Enter the video quality you would like to be displayed by default. If
the selected quality is not available, the plugin will try to show
one of lower quality. For instance, if you enter 3 in the
configuration below and 480p is not available, the plugin will try to
show 2 (360p). If this is still not available it will move down again
to 1 (240p). If for some reason none of the lower qualities are
available (or there is no lower quality to try), the plugin will try
to show one quality option better than the default. For instance, if
you choose 1 (240p) and this quality is not available, the plugin
will try 2 (360p).
********************************************************************/
$pluginConfig['defaultQuality'] = 2;
/********************************************************************
Custom subdomain/domain cnamed to get.otcdn.com
You must leave it blank if you have not set it up. If you have set
this up in your DNS then enter it between the single quotes below
WITHOUT the http:// at the start or a slash at the end. Then
uncomment the line by removing the two forward slashes at the start.
********************************************************************/
//$pluginConfig['customSubdomain'] = 'something.yourproxy.com';
?>