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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7//tempfile.pyc
ó
ÿ–|_c
@sdZddddddddd	d
g
ZddlZddlZdd
lmZyddl	m
ZWn!ek
r‰ddl
m
ZnXyddl
ZWnek
r¶d„Zn
Xd„ZyddlZWnek
rïddlZnXejZejejBejBZeedƒr/eejOZneedƒrNeejOZneZeedƒrseejOZneedƒrŽejZndZdZeƒZ eedƒr¾ej!Z"n$eedƒrÙej#Z"n	d„Z"d„Z$dd.d„ƒYZ%d„Z&d„Z'da)d„Z*d„Z+d „Z,da-d!„Z.d"ede/d#„Z0d"edd$„Z1d"edd%„Z2d&d/d'„ƒYZ3d(dd"ede4d)„Z5ej6d*ksÈej7j8d+krÑe5Z9nd(dd"edd,„Z9dd0d-„ƒYZ:dS(1søTemporary files.

This module provides generic, low- and high-level interfaces for
creating temporary files and directories.  The interfaces listed
as "safe" just below can be used without fear of race conditions.
Those listed as "unsafe" cannot, and are provided for backward
compatibility only.

This module also provides some data items to the user:

  TMP_MAX  - maximum number of names that will be tried before
             giving up.
  template - the default prefix for all temporary names.
             You may change this to control the default prefix.
  tempdir  - If this is set to a string before the first use of
             any routine from this module, it will be considered as
             another candidate location to store temporary files.
tNamedTemporaryFilet
TemporaryFiletSpooledTemporaryFiletmkstemptmkdtemptmktemptTMP_MAXt
gettempprefixttempdirt
gettempdiriÿÿÿÿN(tRandom(tStringIOcCsdS(N((tfd((s/usr/lib/python2.7/tempfile.pyt_set_cloexec,scCsWytj|tjdƒ}Wntk
r/n$X|tjO}tj|tj|ƒdS(Ni(t_fcntltfcntltF_GETFDtIOErrort
FD_CLOEXECtF_SETFD(Rtflags((s/usr/lib/python2.7/tempfile.pyR
/s

tO_NOINHERITt
O_NOFOLLOWtO_BINARYi'ttmptlstattstatcCs;yt|ƒ}Wntk
r,tj‚nX|jƒdS(N(topenRt_osterrortclose(tfntf((s/usr/lib/python2.7/tempfile.pyt_stat\s


cCs.yt|ƒWntjk
r%tSXtSdS(N(R!RRtFalsetTrue(R((s/usr/lib/python2.7/tempfile.pyt_existscs
t_RandomNameSequencecBsFeZdZdddZd„Zed„ƒZd„Zd„ZRS(s*An instance of _RandomNameSequence generates an endless
    sequence of unpredictable strings which can safely be incorporated
    into file names.  Each string is six characters long.  Multiple
    threads can safely use the same instance at the same time.

    _RandomNameSequence is an iterator.tabcdefghijklmnopqrstuvwxyztABCDEFGHIJKLMNOPQRSTUVWXYZt0123456789_cCstƒ|_tjj|_dS(N(t_allocate_locktmutexRtpathtnormcase(tself((s/usr/lib/python2.7/tempfile.pyt__init__wscCsCtjƒ}|t|ddƒkr<tƒ|_||_n|jS(Nt_rng_pid(RtgetpidtgetattrtNonet_Randomt_rngR/(R-tcur_pid((s/usr/lib/python2.7/tempfile.pytrng{s
cCs|S(N((R-((s/usr/lib/python2.7/tempfile.pyt__iter__ƒscCso|j}|j}|jj}|jƒz#gdD]}||ƒ^q2}Wd|jƒX|jdj|ƒƒS(Nt123456t(R*t
charactersR6tchoicetacquiretreleaseR,tjoin(R-tmtctchoosetdummytletters((s/usr/lib/python2.7/tempfile.pytnext†s		
#(	t__name__t
__module__t__doc__R:R.tpropertyR6R7RD(((s/usr/lib/python2.7/tempfile.pyR%ks		cCsüg}x3dD]+}tj|ƒ}|r
|j|ƒq
q
Wtjdkrstjdƒ}|r´|j|ƒq´nAtjdkrž|jddd	d
gƒn|jddd
gƒy|jtjƒƒWn*ttjfk
r÷|jtjƒnX|S(s[Generate a list of candidate temporary directories which
    _get_default_tempdir will try.tTMPDIRtTEMPtTMPtriscoss
Wimp$ScrapDirtntsc:\tempsc:\tmps\temps\tmps/tmps/var/tmps/usr/tmp(RIRJRK(	RtgetenvtappendtnametextendtgetcwdtAttributeErrorRtcurdir(tdirlisttenvnametdirname((s/usr/lib/python2.7/tempfile.pyt_candidate_tempdir_list“s"
c
Cs7tƒ}tƒ}t}x|D]ú}|tjkrUtjjtjj|ƒƒ}nxÁtdƒD]³}|j	ƒ}tjj
||ƒ}yYtj||dƒ}tj|dƒ}|j
dƒ|jƒtj|ƒ~~|SWqbttfk
r}	|	dtjkrPqqbXqbWqWttjd|f‚dS(sqCalculate the default directory to use for temporary files.
    This routine should be called exactly once.

    We determine whether or not a candidate temp dir is usable by
    trying to create and write to a file in that directory.  If this
    is successful, the test file is deleted.  To prevent denial of
    service, the name of the test file must be randomized.idi€twtblatis)No usable temporary directory found in %sN(R%RXt_text_openflagsRRTR+R,tabspathtxrangeRDR>RtfdopentwriteRtunlinktOSErrorRt_errnotEEXISTtENOENT(
tnamerRURtdirtseqRPtfilenameRtfpte((s/usr/lib/python2.7/tempfile.pyt_get_default_tempdir¯s.			
!


	cCsGtdkrCtjƒztdkr1tƒanWdtjƒXntS(s7Common setup sequence for all user-callable interfaces.N(t_name_sequenceR2t
_once_lockR<R%R=(((s/usr/lib/python2.7/tempfile.pyt_get_candidate_namesÔs
c
CsÉtƒ}x§ttƒD]™}|jƒ}tjj||||ƒ}y9tj||dƒ}t|ƒ|tjj	|ƒfSWqt
k
r®}	|	jtj
kr¨qn‚qXqWttj
df‚dS(s>Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.i€s#No usable temporary file name foundN(RnR]RRDRR+R>RR
R\RaterrnoRbRcR(
RftpretsufRtnamesRgRPtfileRRj((s/usr/lib/python2.7/tempfile.pyt_mkstemp_innerâs	
cCstS(sAccessor for tempdir.template.(ttemplate(((s/usr/lib/python2.7/tempfile.pyRøscCsGtdkrCtjƒztdkr1tƒanWdtjƒXntS(sAccessor for tempfile.tempdir.N(RR2RmR<RkR=(((s/usr/lib/python2.7/tempfile.pyR	þs
R9cCs@|dkrtƒ}n|r't}nt}t||||ƒS(s'User-callable function to create and return a unique temporary
    file.  The return value is a pair (fd, name) where fd is the
    file descriptor returned by os.open, and name is the filename.

    If 'suffix' is specified, the file name will end with that suffix,
    otherwise there will be no suffix.

    If 'prefix' is specified, the file name will begin with that prefix,
    otherwise a default prefix is used.

    If 'dir' is specified, the file will be created in that directory,
    otherwise a default directory is used.

    If 'text' is specified and true, the file is opened in text
    mode.  Else (the default) the file is opened in binary mode.  On
    some operating systems, this makes no difference.

    The file is readable and writable only by the creating user ID.
    If the operating system uses permission bits to indicate whether a
    file is executable, the file is executable by no one. The file
    descriptor is not inherited by children of this process.

    Caller is responsible for deleting the file when done with it.
    N(R2R	R[t_bin_openflagsRt(tsuffixtprefixRfttextR((s/usr/lib/python2.7/tempfile.pyR
s	cCsÀ|dkrtƒ}ntƒ}x†ttƒD]x}|jƒ}tjj||||ƒ}ytj	|dƒ|SWq.t
k
r¥}|jtj
krŸq.n‚q.Xq.Wttj
df‚dS(sUser-callable function to create and return a unique temporary
    directory.  The return value is the pathname of the directory.

    Arguments are as for mkstemp, except that the 'text' argument is
    not accepted.

    The directory is readable, writable, and searchable only by the
    creating user.

    Caller is responsible for deleting the directory when done with it.
    iÀs(No usable temporary directory name foundN(R2R	RnR]RRDRR+R>tmkdirRaRoRbRcR(RwRxRfRrRgRPRsRj((s/usr/lib/python2.7/tempfile.pyR/s
	cCs‡|dkrtƒ}ntƒ}xMttƒD]?}|jƒ}tjj||||ƒ}t	|ƒs.|Sq.Wt
tjdf‚dS(sšUser-callable function to return a unique temporary file name.  The
    file is not created.

    Arguments are as for mkstemp, except that the 'text' argument is
    not accepted.

    This function is unsafe and should not be used.  The file name
    refers to a file that did not exist at some point, but by the time
    you get around to creating it, someone else may have beaten you to
    the punch.
    s"No usable temporary filename foundN(
R2R	RnR]RRDRR+R>R$RRbRc(RwRxRfRrRgRPRs((s/usr/lib/python2.7/tempfile.pyRNs	t_TemporaryFileWrappercBskeZdZed„Zd„Zd„Zejdkr`ej	Z	d„Z
d„Zd„Zn	d„ZRS(	sÄTemporary file wrapper

    This class provides a wrapper around files opened for
    temporary use.  In particular, it seeks to automatically
    remove the file when it is no longer needed.
    cCs(||_||_t|_||_dS(N(RsRPR"tclose_calledtdelete(R-RsRPR}((s/usr/lib/python2.7/tempfile.pyR.ts			cCsN|jd}t||ƒ}tt|ƒtdƒƒsJt|||ƒn|S(NRsi(t__dict__R1t
issubclassttypetsetattr(R-RPRsta((s/usr/lib/python2.7/tempfile.pyt__getattr__zs

cCs|jjƒ|S(N(Rst	__enter__(R-((s/usr/lib/python2.7/tempfile.pyR„†s
RMcCsB|js>t|_|jjƒ|jr>|j|jƒq>ndS(N(R|R#RsRR}R`RP(R-((s/usr/lib/python2.7/tempfile.pyR•s
		
	cCs|jƒdS(N(R(R-((s/usr/lib/python2.7/tempfile.pyt__del__œscCs&|jj|||ƒ}|jƒ|S(N(Rst__exit__R(R-texctvaluettbtresult((s/usr/lib/python2.7/tempfile.pyR†¡s
cCs|jj|||ƒdS(N(RsR†(R-R‡RˆR‰((s/usr/lib/python2.7/tempfile.pyR†¦s(
RERFRGR#R.RƒR„RRPR`RR…R†(((s/usr/lib/python2.7/tempfile.pyR{ls					sw+bc
Cs˜|dkrtƒ}nd|kr-t}nt}tjdkrX|rX|tjO}nt||||ƒ\}}tj|||ƒ}	t	|	||ƒS(s6Create and return a temporary file.
    Arguments:
    'prefix', 'suffix', 'dir' -- as for mkstemp.
    'mode' -- the mode argument to os.fdopen (default "w+b").
    'bufsize' -- the buffer size argument to os.fdopen (default -1).
    'delete' -- whether the file is deleted on close (default True).
    The file is created as mkstemp() would do it.

    Returns an object with a file-like interface; the name of the file
    is accessible as file.name.  The file will be automatically deleted
    when it is closed unless the 'delete' argument is set to False.
    tbRMN(
R2R	RvR[RRPtO_TEMPORARYRtR^R{(
tmodetbufsizeRwRxRfR}RRRPRs((s/usr/lib/python2.7/tempfile.pyRªs	tposixtcygwincCs|dkrtƒ}nd|kr-t}nt}t||||ƒ\}}y$tj|ƒtj|||ƒSWntj|ƒ‚nXdS(s¶Create and return a temporary file.
        Arguments:
        'prefix', 'suffix', 'dir' -- as for mkstemp.
        'mode' -- the mode argument to os.fdopen (default "w+b").
        'bufsize' -- the buffer size argument to os.fdopen (default -1).
        The file is created as mkstemp() would do it.

        Returns an object with a file-like interface.  The file has no
        name, and will cease to exist when it is closed.
        R‹N(	R2R	RvR[RtRR`R^R(RRŽRwRxRfRRRP((s/usr/lib/python2.7/tempfile.pyRÐs
	

cBs4eZdZeZddddedd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
ed„ƒZed
„ƒZd„Zd„Zd„Zed„ƒZed„ƒZed„ƒZd„Zd„Zd„Zd„Zd„Zed„ƒZd„Zd„Zd„Zd„Z d„Z!RS( s’Temporary file wrapper, specialized to switch from
    StringIO to a real file when it exceeds a certain size or
    when a fileno is needed.
    isw+biÿÿÿÿR9cCs:tƒ|_||_t|_|||||f|_dS(N(t	_StringIOt_filet	_max_sizeR"t_rolledt_TemporaryFileArgs(R-tmax_sizeRRŽRwRxRf((s/usr/lib/python2.7/tempfile.pyR.ôs		cCs?|jr
dS|j}|r;|jƒ|kr;|jƒndS(N(R”R“ttelltrollover(R-RsR–((s/usr/lib/python2.7/tempfile.pyt_checkûs
		cCsh|jr
dS|j}t|jŒ}|_|`|j|jƒƒ|j|jƒdƒt|_dS(Ni(	R”R’RR•R_tgetvaluetseekR—R#(R-Rstnewfile((s/usr/lib/python2.7/tempfile.pyR˜s		cCs|jjrtdƒ‚n|S(Ns%Cannot enter context with closed file(R’tclosedt
ValueError(R-((s/usr/lib/python2.7/tempfile.pyR„scCs|jjƒdS(N(R’R(R-R‡RˆR‰((s/usr/lib/python2.7/tempfile.pyR†scCs
|jjƒS(N(R’R7(R-((s/usr/lib/python2.7/tempfile.pyR7scCs|jjƒdS(N(R’R(R-((s/usr/lib/python2.7/tempfile.pyRscCs
|jjS(N(R’R(R-((s/usr/lib/python2.7/tempfile.pyR!scCs
|jjS(N(R’tencoding(R-((s/usr/lib/python2.7/tempfile.pyRŸ%scCs|jƒ|jjƒS(N(R˜R’tfileno(R-((s/usr/lib/python2.7/tempfile.pyR )s
cCs|jjƒdS(N(R’tflush(R-((s/usr/lib/python2.7/tempfile.pyR¡-scCs
|jjƒS(N(R’tisatty(R-((s/usr/lib/python2.7/tempfile.pyR¢0scCs
|jjS(N(R’R(R-((s/usr/lib/python2.7/tempfile.pyR3scCs
|jjS(N(R’RP(R-((s/usr/lib/python2.7/tempfile.pyRP7scCs
|jjS(N(R’tnewlines(R-((s/usr/lib/python2.7/tempfile.pyR£;scCs
|jjS(N(R’RD(R-((s/usr/lib/python2.7/tempfile.pyRD?scGs|jj|ŒS(N(R’tread(R-targs((s/usr/lib/python2.7/tempfile.pyR¤BscGs|jj|ŒS(N(R’treadline(R-R¥((s/usr/lib/python2.7/tempfile.pyR¦EscGs|jj|ŒS(N(R’t	readlines(R-R¥((s/usr/lib/python2.7/tempfile.pyR§HscGs|jj|ŒdS(N(R’R›(R-R¥((s/usr/lib/python2.7/tempfile.pyR›KscCs
|jjS(N(R’t	softspace(R-((s/usr/lib/python2.7/tempfile.pyR¨NscCs
|jjƒS(N(R’R—(R-((s/usr/lib/python2.7/tempfile.pyR—RscCs|jjƒdS(N(R’ttruncate(R-((s/usr/lib/python2.7/tempfile.pyR©UscCs)|j}|j|ƒ}|j|ƒ|S(N(R’R_R™(R-tsRstrv((s/usr/lib/python2.7/tempfile.pyR_Xs	
cCs)|j}|j|ƒ}|j|ƒ|S(N(R’t
writelinesR™(R-titerableRsR«((s/usr/lib/python2.7/tempfile.pyR¬^s	
cGs|jj|ŒS(N(R’t
xreadlines(R-R¥((s/usr/lib/python2.7/tempfile.pyR®dsN("RERFRGR"R”RuR2R.R™R˜R„R†R7RRHRRŸR R¡R¢RRPR£RDR¤R¦R§R›R¨R—R©R_R¬R®(((s/usr/lib/python2.7/tempfile.pyRís:																			((((;RGt__all__tosRRoRbtrandomR
R3t	cStringIORR‘tImportErrorRRR
tthreadt_threadtdummy_threadt
allocate_lockR)tO_RDWRtO_CREATtO_EXCLR[thasattrRRRvRRRuRmRR!RR$R%RXRkR2RlRnRtRRR	R"RRRR{R#RRPtsystplatformRR(((s/usr/lib/python2.7/tempfile.pyt<module>s|


	
				(		#				%>	!		

Youez - 2016 - github.com/yon3zu
LinuXploit