403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/twisted/python/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyc
ó
Ý&Mc@sdZddlZddlZddlZddlZddlZejejƒZ	dej
fd„ƒYZdefd„ƒYZ
de
fd„ƒYZd	e
fd
„ƒYZddd
„ZdZdded„Zd„Zd„Zd„Zdddd„ZdS(sŸ
An incremental approach to unzipping files.  This allows you to unzip a little
bit of a file at a time, which means you can report progress as a file unzips.
iÿÿÿÿNtChunkingZipFilecBseZdZd„ZRS(sq
    A ZipFile object which, with readfile(), also gives you access to a
    filelike object for each entry.
    cCs||jdkrtdƒ‚n|js6tdƒ‚n|j|ƒ}|jj|jdƒ|jjtƒ}|dd!tj	kr•tj
dƒ‚ntjtj
|ƒ}|jj|tjƒ}|tjrê|jj|tjƒn||jkrtj
d|j|fƒ‚n|jtjkr:t||jƒS|jtjkr\t||jƒStj
d	|j|fƒ‚d
S(s3
        Return file-like object for name.
        trtasread() requires mode "r" or "a"s3Attempt to read ZIP archive that was already closediis Bad magic number for file headers3File name in directory "%s" and header "%s" differ.s-Unsupported compression method %d for file %sN(RR(tmodetRuntimeErrortfptgetinfotseekt
header_offsettreadt_fileHeaderSizetzipfiletstringFileHeadert
BadZipfiletstructtunpacktstructFileHeadert_FH_FILENAME_LENGTHt_FH_EXTRA_FIELD_LENGTHt
orig_filenamet
compress_typet
ZIP_STOREDtZipFileEntryt
compress_sizetZIP_DEFLATEDtDeflatedZipFileEntry(tselftnametzinfotfheadertfname((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytreadfiles2	
(t__name__t
__module__t__doc__R(((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyRst
_FileEntrycBsVeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	s!
    Abstract superclass of both compressed and uncompressed variants of
    file-like objects within a zip archive.

    @ivar chunkingZipFile: a chunking zip file.
    @type chunkingZipFile: L{ChunkingZipFile}

    @ivar length: The number of bytes within the zip file that represent this
    file.  (This is the size on disk, not the number of decompressed bytes
    which will result from reading it.)

    @ivar fp: the underlying file object (that contains pkzip data).  Do not
    touch this, please.  It will quite likely move or go away.

    @ivar closed: File-like 'closed' attribute; True before this file has been
    closed, False after.
    @type closed: L{bool}

    @ivar finished: An older, broken synonym for 'closed'.  Do not touch this,
    please.
    @type finished: L{int}
    cCs7||_|jj|_||_d|_t|_dS(sC
        Create a L{_FileEntry} from a L{ChunkingZipFile}.
        iN(tchunkingZipFileRtlengthtfinishedtFalsetclosed(RR$R%((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyt__init__Vs
			cCstS(sD
        Returns false because zip files should not be ttys
        (R'(R((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytisattyascCst|_d|_|`dS(s/
        Close self (file-like object)
        iN(tTrueR(R&R(R((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytclosehs		csGd}x:t‡fd†dƒD] }||7}|dkrPqqW|S(s
        Read a line.
        tcs
ˆjdƒS(Ni(R	((R(s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyt<lambda>vss
(titer(Rtbytestbyte((Rs</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytreadlineqs
cCs#|jƒ}|r|Stƒ‚dS(si
        Implement next as file does (like readline, except raises StopIteration
        at EOF)
        N(R2t
StopIteration(Rtnextline((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytnext}scCs
t|ƒS(s1
        Returns a list of all the lines
        (tlist(R((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyt	readlinesˆscCs|S(s/
        Returns an iterator (so self)
        ((R((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyt
xreadlinesscCs|S(s/
        Returns an iterator (so self)
        ((R((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyt__iter__–s(R R!R"R)R*R,R2R5R7R8R9(((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyR#?s								RcBs,eZdZd„Zd„Zdd„ZRS(sJ
    File-like object used to read an uncompressed entry in a ZipFile
    cCs tj|||ƒd|_dS(Ni(R#R)t	readBytes(RR$R%((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyR)£scCs|jS(N(R:(R((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyttell¨scCs©|dkr|j|j}n|dks4|jr8dS|jjjt||j|jƒƒ}|jt|ƒ7_|j|jks™t|ƒ|kr¥d|_n|S(NiR-i(	tNoneR%R:R&R$RR	tmintlen(Rtntdata((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyR	¬s$N(R R!R"R)R;R<R	(((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyRžs		RcBs,eZdZd„Zd„Zdd„ZRS(sE
    File-like object used to read a deflated entry in a ZipFile
    cCsDtj|||ƒd|_d|_tjdƒ|_d|_dS(NiiñÿÿÿR-(R#R)t
returnedBytesR:tzlibt
decompressobjtdecomptbuffer(RR$R%((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyR)¿s
		cCs|jS(N(RA(R((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyR;ÇscCsÈ|jr
dS|dkrÀ|jg}|j|jj|jjj|j	|j
ƒƒƒ|j|jjdƒƒ|j|jjƒƒd|_d|_dj|ƒ}|j
t|ƒ7_
|SxËt|jƒ|kr|jjjt|d|j	|j
ƒƒ}|j
t|ƒ7_
|so|j|jjdƒ|jjƒ}d|_d|_|j
t|ƒ7_
|S|j|jj|ƒ7_qÃW|j| }|j||_|j
t|ƒ7_
|SdS(NR-tZii(R&R<REtappendRDt
decompressR$RR	R%R:tflushtjoinRAR>R=(RR?tresultR@((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyR	Ës<				&		
N(R R!R"R)R;R<R	(((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyRºs		t.icCsDtjdddtddƒx t|||dtƒD]}q6WdS(sG
    Unzip the file

    @param filename: the name of the zip file
    @param directory: the directory into which the files will be
    extracted
    @param overwrite: if on, overwrite files when they exist.  You can
    still get an error if you try to create a directory over a file
    with the same name or vice-versa.
    s7zipstream.unzip is deprecated since Twisted 11.0.0 for s0security reasons.  Use Python's zipfile instead.tcategoryt
stacklevelitsuppressWarningN(twarningstwarntDeprecationWarningt	unzipIterR+(tfilenamet	directoryt	overwriteti((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytunzipñs
	
iccsy|s*tjddddtddƒntj|dƒ}|jƒ}tjj|ƒsjtj	|ƒnt
|jƒƒ}xö|D]î}|d8}|j|ƒjt
@}tjj||ƒ}	|rétjj|	ƒsltj	|	ƒqlnƒtjj|	ƒd	}
tjj|
ƒs!tj	|
ƒn|s:tjj|	ƒrlt|	d
ƒ}|j|j|ƒƒ|jƒn|VqƒWdS(s¢
    Return a generator for the zipfile.  This implementation will yield
    after every file.

    The value it yields is the number of files left to unzip.
    s0zipstream.unzipIter is deprecated since Twisted s+11.0.0 for security reasons.  Use Python's szipfile instead.RMRNiRiitwbN(RPRQRRRtZipFiletnamelisttostpathtexiststmakedirsR>Rt
external_attrtDIR_BITRJtsplittfiletwriteR	R,(RTRURVROtzftnamest	remainingtentrytisdirtftfdirtoutfile((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyRSs2


cCs@d}t|ƒ}x'|jƒD]}|t||ƒ7}qW|S(sr
    Predict the number of chunks that will be extracted from the entire
    zipfile, given chunksize blocks.
    i(RtinfolisttcountFileChunks(RTt	chunksizettotalchunksRetinfo((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytcountZipFileChunks,s
cCs;t|j|ƒ\}}|dkr1|d7}n|p:dS(s9
    Count the number of chunks that will result from the given L{ZipInfo}.

    @param zipinfo: a L{zipfile.ZipInfo} instance describing an entry in a zip
    archive to be counted.

    @return: the number of chunks present in the zip file.  (Even an empty file
    counts as one chunk.)
    @rtype: L{int}
    ii(tdivmodt	file_size(tzipinfoRotcounttextra((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyRn8s
cCs2tjdtdƒtj|ƒ}t|jƒƒS(s£
    Count the number of entries in a zip archive.  (Don't use this function.)

    @param filename: The filename of a zip archive.
    @type filename: L{str}
    s"countZipFileEntries is deprecated.i(RPRQRRRRZR>R[(RTRe((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytcountZipFileEntriesIs	
iccsÔt|dƒ}tjj|ƒs1tj|ƒnt||ƒ}|jƒ}|jƒ}xut||ƒD]d\}}	|	j	t
@}
tjj||ƒ}|
rÐtjj|ƒs¾tj|ƒn|d8}|Vqhtjj|ƒd}tjj|ƒstj|ƒn|s!tjj|ƒr´t
|dƒ}
|j|ƒ}|	jdkr`|d8}|VnxD|jƒ|	jkr¦|j|ƒ}|
j|ƒ|d8}|VqcW|
jƒqh|t|	|ƒ8}|VqhWdS(sï
    Return a generator for the zipfile.  This implementation will yield after
    every chunksize uncompressed bytes, or at the end of a file, whichever
    comes first.

    The value it yields is the number of chunks left to unzip.
    RiiRYN(RR\R]R^R_RrR[RmtzipR`RaRJRbRcRRtR;R	RdR,Rn(RTRURVRotczfRgRftinfosRhRqRiRjRkRlRthunk((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pytunzipIterChunkyVs>	




	
(R"RPRtos.pathR\RBRtcalcsizeRR
RZRtobjectR#RRRXRaR'RSRrRnRxR}(((s</usr/lib/python2.7/dist-packages/twisted/python/zipstream.pyt<module>s$-_7'			


Youez - 2016 - github.com/yon3zu
LinuXploit