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/internet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyc
ó
ƇNc@sGdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ej
ƒZde_ddl
mZddlmZmZmZddlmZddlmZddlmZdd	lmZd
„Zdejfd„ƒYZd
„Zd„Zdejefd„ƒYZ dS(s4
http://isometric.sixsided.org/_/gates_in_the_head/
iÿÿÿÿNi(t
implements(tIProcessTransportt	IConsumert	IProducer(tquoteArguments(terror(t_pollingfile(tBaseProcesscCs"ddl}|GH|jjƒdS(Niÿÿÿÿ(tsyststdouttflush(tmsgR((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pytdebug$st_ReapercBseZd„Zd„ZRS(cCs
||_dS(N(tproc(tselfR((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt__init__+scCsXtj|jjdƒtjkr%dStj|jjƒ}|jƒ|jj|ƒdS(Ni(	t
win32eventtWaitForSingleObjectRthProcesst
WAIT_OBJECT_0twin32processtGetExitCodeProcesst
deactivatetprocessEnded(RtexitCode((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt	checkWork.s!
(t__name__t
__module__RR(((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR
)s	cCsDt|dƒ}|jdƒdkr@|jdƒjdƒ}|SdS(s 
    Look for a #! line, and return the value following the #! if one exists, or
    None if this file is not a script.

    I don't know if there are any conventions for quoting in Windows shebang
    lines, so this doesn't support any; therefore, you may not pass any
    arguments to scripts invoked as filters.  That's probably wrong, so if
    somebody knows more about the cultural expectations on Windows, please feel
    free to fix.

    This shebang line support was added in support of the CGI tests;
    appropriately enough, I determined that shebang lines are culturally
    accepted in the Windows world through this page::

        http://www.cgi101.com/learn/connect/winxp.html

    @param filename: str representing a filename

    @return: a str representing another filename.
    trUis#!is
N(tfiletreadtreadlinetstrip(tfilenametftexe((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt_findShebang7scCs|jddkS(sù
    Determine if a pywintypes.error is telling us that the given process is
    'not a valid win32 application', i.e. not a PE format executable.

    @param pywinerr: a pywintypes.error instance raised by CreateProcess

    @return: a boolean
    iiÁ(targs(tpywinerr((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt_invalidWin32AppQstProcesscBsêeZdZeeeeƒdZd„Zd„Z	d„Z
d„Zd„Zd„Z
d„Zd	„Zd
„Zd„Zd„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(s•A process that integrates with the Twisted event loop.

    If your subprocess is a python program, you need to:

     - Run python.exe with the '-u' command line option - this turns on
       unbuffered I/O. Buffering stdout/err/in can cause problems, see e.g.
       http://support.microsoft.com/default.aspx?scid=kb;EN-US;q1903

     - If you don't want Windows messing with data passed over
       stdin/out/err, set the pipes to be in binary mode::

        import os, sys, mscvrt
        msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
        msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
        msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)

    ics6tjjˆ|ƒtjˆ|ƒtjƒ}d|_tj|dƒ\ˆ_	}tj|dƒ\ˆ_
}	tj|dƒ\}
ˆ_tjˆjtj
d	d	ƒtjƒ‰|ˆ_|	ˆ_|
ˆ_tjˆ_tjƒ}tj|ˆj	|ddtjƒ}tjˆj	ƒ|ˆ_	tj|ˆj
|ddtjƒ}tjˆj
ƒ|ˆ_
tj|ˆj|ddtjƒ}tjˆjƒ|ˆ_tjjƒ‰ˆj |p¹iƒt!|ƒ‰‡‡‡‡‡‡fd†}
y€y|
ƒWnnt"k
re}|j#d
kr‚ni}x0ˆj$ƒD]"\}}t%|ƒ|t%|ƒ<q/W|‰|
ƒnXWnåt&j'k
rN}t(|ƒs—t)|ƒ‚qOt*ˆƒ}|d	krÂt)dˆƒ‚qOt+|ƒ}|j,dˆƒt!|ƒ‰ˆ}|‰y|
ƒWqOt&j'k
rJ}t(|ƒr;t)d||fƒ‚nt)|ƒ‚qOXnXtj|	ƒtj|ƒtj|
ƒtj-ˆj	‡fd†ˆj.ƒˆ_/tj-ˆj
‡fd†ˆj0ƒˆ_1tj2ˆjˆj3ƒˆ_4x-ˆj/ˆj1ˆj4fD]}ˆj5|ƒqøWˆj6j7ˆƒˆj5t8ˆƒƒd	S(s-
        Create a new child process.
        iic
s@tjˆˆddddˆˆˆƒ	\ˆ_ˆ_ˆ_}dS(Nii(Rt
CreateProcesstNoneRthThreadtpid(tdwTid(RtStartupInfotcmdlinetcommandtenvtpath(sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pytdoCreate®ss<All dictionary items must be strings, or all must be unicodesD%r is neither a Windows executable, nor a script with a shebang lines<%r has an invalid shebang line: %r is not a valid executablecsˆjjd|ƒS(Ni(tprototchildDataReceived(tdata(R(sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt<lambda>æscsˆjjd|ƒS(Ni(R5R6(R7(R(sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR8ësN(s<All dictionary items must be strings, or all must be unicode(9Rt
_PollingTimerRRt
win32securitytSECURITY_ATTRIBUTEStbInheritHandlet	win32pipet
CreatePipethStdoutRthStderrRthStdinWtSetNamedPipeHandleStatetPIPE_NOWAITR+RtSTARTUPINFOt
hStdOutputt	hStdErrort	hStdInputtSTARTF_USESTDHANDLEStdwFlagstwin32apitGetCurrentProcesstDuplicateHandletwin32contDUPLICATE_SAME_ACCESSt	win32filetCloseHandletostenvirontcopytupdateRt	TypeErrorR&titemstunicodet
pywintypesRR(tOSErrorR%tlisttinsertt_PollableReadPipetoutConnectionLostR	terrConnectionLosttstderrt_PollableWritePipetinConnectionLosttstdint_addPollableResourceR5tmakeConnectionR
(RtreactortprotocolR1R&tenvironmentR3tsAttrsthStdoutWthStderrWthStdinRt
currentPidttmpR4tetnewenvtkeytvaluetpwtetshebtorigcmdtpwte2tpipewatcher((R0R/RR2R1R3sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyRws¤							



cCsD|jdkrtjƒ‚n|dkr@tj|jdƒndS(NtINTtTERMtKILLi(RwRxRy(R-R+RtProcessExitedAlreadyRtTerminateProcessR(RtsignalID((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt
signalProcessûscCs&|dkrtj|ƒStj|ƒS(Ni(RtProcessDonetProcessTerminated(Rtstatus((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt
_getReasons
cCs|jj|ƒdS(sO
        Write data to the process' stdin.

        @type data: C{str}
        N(Rbtwrite(RR7((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR‚scCs|jj|ƒdS(sZ
        Write data to the process' stdin.

        @type data: C{list} of C{str}
        N(Rbt
writeSequence(Rtseq((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyRƒscCs/|dkr|jj|ƒnt|ƒ‚dS(s9
        Similar to L{ITransport.write} but also allows the file descriptor in
        the child process which will receive the bytes to be specified.

        This implementation is limited to writing to the child's standard input.

        @param fd: The file descriptor to which to write.  Only stdin (C{0}) is
            supported.
        @type fd: C{int}

        @param data: The bytes to write.
        @type data: C{str}

        @return: C{None}

        @raise KeyError: If C{fd} is anything other than the stdin file
            descriptor (C{0}).
        iN(RbR‚tKeyError(RtfdR7((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pytwriteToChildscCs[|dkr|jƒn>|dkr2|jƒn%|dkrK|jƒntdƒ‚dS(Niiis4Only standard-IO file descriptors available on win32(t
closeStdintcloseStdouttcloseStderrtNotImplementedError(RR†((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pytcloseChildFD3s


cCs|jjƒdS(s"Close the process' stdin.
        N(Rbtclose(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyRˆ=scCs|jjƒdS(N(R_R(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyRŠBscCs|jjƒdS(N(R	R(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR‰EscCs"|jƒ|jƒ|jƒdS(s&Close the process' stdout, in and err.N(RˆR‰RŠ(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pytloseConnectionHs

cCs|jjdƒ|jƒdS(Ni(R5tchildConnectionLosttconnectionLostNotify(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR]OscCs|jjdƒ|jƒdS(Ni(R5RR(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR^TscCs|jjdƒ|jƒdS(Ni(R5RR(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyRaYscCs|jd7_|jƒdS(sS
        Will be called 3 times, by stdout/err threads and process handle.
        iN(tclosedNotifiestmaybeCallProcessEnded(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR^scCs^|jdkrZ|jrZtj|jƒtj|jƒd|_d|_tj|ƒndS(Ni(	R‘tlostProcessRORPRR,R+RR’(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR’fs		cCs|jj||ƒdS(N(RbtregisterProducer(Rtproducert	streaming((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR”pscCs|jjƒdS(N(RbtunregisterProducer(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR—sscCs|jƒdS(N(t_pause(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pytpauseProducingwscCs|jƒdS(N(t_unpause(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pytresumeProducingzscCs|jƒdS(N(RŽ(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt
stopProducing}scCsd|jj|jfS(s@
        Return a string representation of the process.
        s<%s pid=%s>(t	__class__RR-(R((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt__repr__€s(RRt__doc__RRRRR‘RR}RR‚RƒR‡RŒRˆRŠR‰RŽR]R^RaRR’R”R—R™R›RœRž(((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyR)as2	„								
									
					(!RŸRQRJRMRROR=RR:RXR;tPIPE_ATTRS_INHERITABLER<tzope.interfaceRttwisted.internet.interfacesRRRttwisted.python.win32Rttwisted.internetRRttwisted.internet._baseprocessRRt_PollableResourceR
R%R(R9R)(((sC/usr/lib/python2.7/dist-packages/twisted/internet/_dumbwin32proc.pyt<module>s,				

Youez - 2016 - github.com/yon3zu
LinuXploit