Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Testing socket_get_status() --FILE-- <?php for ($i=0; $i<100; $i++) { $port = ..
Decoded Output download
--TEST--
Testing socket_get_status()
--FILE--
<?php
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
var_dump(socket_get_status($server));
fclose($server);
?>
--EXPECTF--
array(7) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
["stream_type"]=>
string(%d) "tcp_socket%S"
["mode"]=>
string(2) "r+"
["unread_bytes"]=>
int(0)
["seekable"]=>
bool(false)
}
Did this file decode correctly?
Original Code
--TEST--
Testing socket_get_status()
--FILE--
<?php
for ($i=0; $i<100; $i++) {
$port = rand(10000, 65000);
/* Setup socket server */
$server = @stream_socket_server("tcp://127.0.0.1:$port");
if ($server) {
break;
}
}
var_dump(socket_get_status($server));
fclose($server);
?>
--EXPECTF--
array(7) {
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
["stream_type"]=>
string(%d) "tcp_socket%S"
["mode"]=>
string(2) "r+"
["unread_bytes"]=>
int(0)
["seekable"]=>
bool(false)
}
Function Calls
rand | 1 |
Stats
MD5 | 312917dd976da383926c9cabcef3be14 |
Eval Count | 0 |
Decode Time | 91 ms |