<?php
//echo date("H");
//echo date("i");
/* ESPERO QUE ESTE PROBLEMA ME CUENTE EL DOBLE, PORQUE MI MAQUINA CUENTA CON UN IVI BRIDGE QUE UTILIZA GENERACION POR HARDWARE, Y CASI ME VUELVO
LOCO PARA DESHABILITARLA Y QUE FUNCIONARA CORRECTAMENTE */
//Evitamos que muestre los Warnings
error_reporting(E_ERROR | E_PARSE);
//echo $http_response_header[5];
// echo $hora." ";
// echo $minuto." ";
// echo date("H")." ";
// echo date("i")." ";
//$server = 'http://127.0.0.1/probe.php';
$server = 'http://random.contest.tuenti.net/';
//$contents = file_get_contents('http://random.contest.tuenti.net/?password=2036317783');
$contents = file_get_contents($server.'?password=2036317783&input=326b5d287a');
//var_dump($http_response_header);
for ($ppid = 1; $ppid <= 100; $ppid++){
$pos = strpos($contents, "wrong!");
if ($pos !== false){
//$pos2 = strpos(
//echo $http_response_header[1];
//Buscamos el header en que se encuentra 'Date'
$nHeaders = count($http_response_header);
for ($i = 0; $i <= $nHeaders; $i++){
if(strpos($http_response_header[$i], "Date") !== false){
//echo $i." ";
break;
}
//echo $http_response_header[$i]." ";
}
//echo $i." ";
$hora = substr($http_response_header[$i], 23, -10);
$minuto = substr($http_response_header[$i], 26, -7);
//echo $hora." ".$minuto;
//echo mktime(date("H"),date("i"),0)." ";
//echo mktime($hora, $minuto, 0)." ";
srand(mktime($hora, $minuto, 0) * $ppid);
$rand = rand();
echo $rand." ";
$contents = file_get_contents($server.'?password='.$rand.'&input=326b5d287a');
//$contents = file_get_contents('http://random.contest.tuenti.net/?password='.$rand);
}else{
echo "El ppid valido era ".($ppid-1)." fecha:".$hora." ".$minuto. "<br/>";
echo $contents;
break;
}
}
//echo $contents;
preferences:
29.38 ms | 402 KiB | 5 Q