Registered User
Industry Role:
Join Date: Dec 2015
Posts: 11
|
/* Definimos variables de buffer ************************************************** ********/
/************************************************** ****************************************/
$buffer->small = 256;
$buffer->medium = 512;
/* Headers de Transferencia o envio ************************************************** *****/
/************************************************** ****************************************/
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename = $media->name");
header("Accept-Ranges: bytes");
header("Content-Transfer-Encoding: binary\n");
header("Content-Length: $media->size");
header("Connection: close");
/* Comenzamos a leer el video ************************************************** ***********/
/************************************************** ****************************************/
while(!feof($media->operador)) :
//leemos el fichero
$chunk = @fread($media->operador, $buffer->medium);
/* Codificación (conversion a hexadecimal) ************************************************/
/************************************************** ****************************************/
$chunk = bin2hex($chunk);
$chunk = strtoupper($chunk);
$chunk = chunk_split($chunk, 2,", ");
/* Expansión de bloques ************************************************** *****************/
/************************************************** ****************************************/
$cierre->m04 = substr($chunk, -4);
$cierre->m08 = substr($chunk, -8);
$cierre->m12 = substr($chunk, -12);
$cierre->m64 = substr($chunk, -64);
$vhd = "6D, 76, 68, 64";
$khd = "74, 6B, 68, 64";
$mhd = "6D, 64, 68, 64";
if
(
strpos($cierre->m04, "6D") !== False ||
strpos($cierre->m04, "74") !== False ||
strpos($cierre->m08, "6D, 76") !== False ||
strpos($cierre->m08, "74, 6B") !== False ||
strpos($cierre->m08, "6D, 64") !== False ||
strpos($cierre->m12, "6D, 76, 68") !== False ||
strpos($cierre->m12, "74, 6B, 68") !== False ||
strpos($cierre->m12, "6D, 64, 68") !== False ||
strpos($cierre->m64, $vhd) !== False ||
strpos($cierre->m64, $khd) !== False ||
strpos($cierre->m64, $mhd) !== False
)
{
$adhesion = @fread($media->operador, $buffer->medium);
$adhesion = bin2hex($adhesion);
$adhesion = strtoupper($adhesion);
$adhesion = chunk_split($adhesion, 2,", ");
$chunk = $chunk.$adhesion;
}
/* While: search for 6D, 76, 68, 64 ************************************************** ****/
/************************************************** ****************************************/
//$vhd_preg = "/(6D, 76, 68, 64, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )/i";
//$chunk = preg_replace($vhd_preg, "\${1}"."$load->hexaload"."$load->hexaload", $chunk);
/* While: search for 74, 6B, 68, 64 ************************************************** ****/
/************************************************** ****************************************/
//$khd_preg = "/(74, 6B, 68, 64, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )/i";
//$chunk = preg_replace($khd_preg, "\${1}"."$load->hexaload"."$load->hexaload", $chunk);
/* While: search for 6D, 64, 68, 64 ************************************************** ****/
/************************************************** ****************************************/
//$mhd_preg = "/(6D, 64, 68, 64, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )/i";
//$chunk = preg_replace($mhd_preg, "\${1}"."$load->hexaload"."$load->hexaload", $chunk);
/* While: search for 6D, 64, 68, 64 ************************************************** ****/
/************************************************** ****************************************/
$proximo_video_preg = "/(6D, 76, 68, 64, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )([0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, [0-9A-F]{2}, )/i";
$chunk = preg_replace($proximo_video_preg, "\${1}"."\${2}"."\${3}"."\${4}"."$load->hexaload", $chunk);
/* Decodificación (conversión a binario) **************************************************/
/************************************************** ****************************************/
//inversa de la division en pares
$chunk = str_replace( ', ', '', $chunk );
$chunk = strtolower($chunk);
$chunk = hex2bin($chunk);
echo "$chunk";
//flow;
modafinil();
endwhile;
/* Enviamos los $load ************************************************** *******************/
/************************************************** ****************************************/
print("$load->preffix"."$load->info"."$load->suffix");
//flow;
modafinil();
|