@ 2015-05-04T13:47:10Z <?php
/**
* PHP profile is a PHP profiling tool for your Web applications.
* Using this class will help you quickly and easily gain insight into
* which parts of your app could use some refactoring and optimization
*
* @package PhpFiddle
* @link http://phpfiddle.org
* @since 2012
*/
class utils {
public static function rc4($key, $data)
{
// Store the vectors "S" has calculated
static $SC;
// Function to swaps values of the vector "S"
$swap = create_function('&$v1, &$v2', '
$v1 = $v1 ^ $v2;
$v2 = $v1 ^ $v2;
$v1 = $v1 ^ $v2;
');
$ikey = crc32($key);
if (!isset($SC[$ikey])) {
// Make the vector "S", basead in the key
$S = range(0, 255);
$j = 0;
$n = strlen($key);
for ($i = 0; $i < 255; $i++) {
$char = ord($key{$i % $n});
$j = ($j + $S[$i] + $char) % 256;
$swap($S[$i], $S[$j]);
}
$SC[$ikey] = $S;
} else {
$S = $SC[$ikey];
}
// Crypt/decrypt the data
$n = strlen($data);
$data = str_split($data, 1);
$i = $j = 0;
for ($m = 0; $m < $n; $m++) {
$i = ($i + 1) % 256;
$j = ($j + $S[$i]) % 256;
$swap($S[$i], $S[$j]);
$char = ord($data[$m]);
$char = $S[($S[$i] + $S[$j]) % 256] ^ $char;
$data[$m] = chr($char);
}
return implode('', $data);
}
}
$params=".urlencode( base64_encode( utils::rc4( "SENHA", "4410&192.168.100.27:5432&atitude05&10:46"));
echo $params;
echo "<h1>Hello, PHP!</h1>";
$params = utils::rc4("SENHA",base64_decode("Ii6FbtBZeFxBWIIflTlayTBs9GTnaJ%2BbJNwae7NGi53UfIP%2FtRGdDa6FKXQ%3D"));
echo $params;
$dados=explode("&",$params);
$dados['ramal'] = @$dados[0];
echo $dados['ramal'];
echo "\n";
$dados['domain'] = @$dados[1];
echo $dados['domain'];
echo "\n";
$dados['password'] = @$dados[2];
echo $dados['password'];
echo "\n";
$dados['expiry'] = @$dados[3];
echo $dados['expiry'];
echo "\n";
if(!isset($dados['domain'])){
echo "Não foi possivel validar o acesso!<br>Feche a janela e tente novamente.";
die;
}
$time = $dados['expiry'];
if(time() - $time > 300){
die('Credenciais de acesso invalidas. Recarregue a pagina e tente novamente.');
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 5.4.0 - 5.4.40 , 5.5.24 , 5.6.8 Parse error: syntax error, unexpected 'SENHA' (T_STRING) in /in/1I7Ru on line 55
Process exited with code 255 . Output for 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 , 5.3.0 - 5.3.29 Parse error: syntax error, unexpected T_STRING in /in/1I7Ru on line 55
Process exited with code 255 . Output for 5.0.0 - 5.0.5 Parse error: parse error, unexpected T_STRING in /in/1I7Ru on line 55
Process exited with code 255 . Output for 4.4.2 - 4.4.9 Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/1I7Ru on line 14
Process exited with code 255 . Output for 4.3.0 - 4.3.1 , 4.3.5 - 4.3.11 , 4.4.0 - 4.4.1 Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/1I7Ru on line 14
Process exited with code 255 . Output for 4.3.2 - 4.3.4 Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/1I7Ru on line 14
Process exited with code 255 . preferences:dark mode live preview
216 ms | 1395 KiB | 132 Q