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/_oldtls.pyc
ó
iù™Nc@srdZddlZddlmZedkraddlmZddlmZddlm	Z
n0ddlmZdd	lmZdd
lm
Z
ddlmZddl
mZdd
lmZddlmZmZddlmZddlmZmZddlmZddd„ƒYZid„Zdefd„ƒYZdefd„ƒYZdefd„ƒYZ dS(sH
This module implements OpenSSL socket BIO based TLS support.  It is only used if
memory BIO APIs are not available, which is when the version of pyOpenSSL
installed is older than 0.10 (when L{twisted.protocols.tls} is not importable).
This implementation is undesirable because of the complexity of working with
OpenSSL's non-blocking socket-based APIs (which this module probably does about
99% correctly, but see #4455 for an example of a problem with it).

Eventually, use of this module should emit a warning.  See #4974 and 5014.

@see: L{twisted.internet._newtls}
@since: 11.1
iÿÿÿÿN(tplatformTypetwin32(tWSAEINTR(tWSAEWOULDBLOCK(t
WSAENOBUFS(tEINTR(tEWOULDBLOCK(tENOBUFS(tSSL(t
implements(tlog(t
ITLSTransportt
ISSLTransport(tFileDescriptor(tCONNECTION_DONEtCONNECTION_LOST(t_TLSDelayedt	_TLSMixincBseZdZdZdZeZZd„Zd„Z	d„Z
d„Zd„Zd„Z
d„Zd	„Zd
„Zd„Zd„Zd
„ZRS(t
sock_shutdownicCs
|jjƒS(N(tsockettget_peer_certificate(tself((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pytgetPeerCertificate1scCs|jr
tS|jr,d|_|jƒny|jj|ƒSWnÊtjk
rWtStjk
rkdStj	k
r¨d|_
|jj|ƒ|jj|ƒdStj
k
rö\}}|dkrØ|dksä|dkrètStjƒtStjk
r}|SXdS(NiiiÿÿÿÿsUnexpected EOF(tdisconnectedRtwriteBlockedOnReadt_resetReadWritet_basetdoReadRtZeroReturnErrort
WantReadErrortWantWriteErrortreadBlockedOnWritetstartWritingtstopReadingtSysCallErrorRR
terrtError(Rtretvaltdescte((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR4s0			
	
cCsU|jr|jƒS|jr&|jƒS|jrEd|_|jƒn|jj|ƒS(Ni(Rt_postLoseConnectiont_writeDisconnectedt_closeWriteConnectionRRRtdoWrite(R((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR+^s	
	
		
cCsÓy|jj||ƒSWnµtjk
r.dStjk
rkd|_|jj|ƒ|jj|ƒdStjk
rt	Stj
k
r¸}|ddkr±|dkr±dSt	Sntjk
rÎ}|SXdS(Niiiÿÿÿÿt(Rt
writeSomeDataRRRRtstopWritingtstartReadingRRR"R$(RtdataR'((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR-us"	cCs;t|_t|jdƒr1|jjtjƒn|jƒS(sÄ
        Gets called after loseConnection(), after buffered data is sent.

        We try to send an SSL shutdown alert, but if it doesn't work, retry
        when the socket is writable.
        tset_shutdown(tTrueRthasattrRR1RtRECEIVED_SHUTDOWNt_sendCloseAlert(R((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR(Œs
	cCs"ytj|jjƒdƒWn4tk
rS}|jdtttfkrOdSt	SXy„t
|jdƒrÄ|jjƒ}|jj|t
jBƒ|jjƒ}|t
j@s×|jjt
jƒq×n|jjƒt}Wnt
jk
rñ}|SX|r|jƒtS|jƒ|jƒdSdS(NR,iR1(tostwriteRtfilenotOSErrortargsRRRRR3tget_shutdownR1RR4tshutdownt
SENT_SHUTDOWNR2R$R.RR R/tNone(Rtset	laststatetdoneR'((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR5¢s.





cCs,|jƒ}|tkr(|jj|ƒS|S(N(R5RRR*(Rtresult((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR*ãscCs&t|_|js"|jj|ƒSdS(N(R2t
_userWantReadRRR/(R((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR/ës		cCs0t|_|js|jr,|jj|ƒSdS(N(tFalseRCRRRR!(R((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR!ñs	cCs&t|_|js"|jj|ƒSdS(N(R2t_userWantWriteRRR (R((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR ús		cCs0t|_|js|jr,|jj|ƒSdS(N(RDRERRRR.(R((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR.s	cCsD|jr|jƒn
|jƒ|jr6|jƒn
|jƒdS(N(RER R.RCR/R!(R((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR	s	

	
(t__name__t
__module__t_socketShutdownMethodRRR2RCRERRR+R-R(R5R*R/R!R R.R(((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR*s 
		*				A							cs@ˆ|kr8dtˆf‡fd†ƒY}||ˆ<n|ˆS(Nt
TLSConnectioncseZeeƒˆZRS((RFRGR	RR((tklass(s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyRIs
(R(RJt	_existingRI((RJs</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyt_getTLSClasss
tConnectionMixincBsJeZdZdZdZed„Zd„Zd„Z	d„Z
d„ZRS(sƒ
    Mixin for L{twisted.internet.tcp.Connection} to help implement
    L{ITLSTransport} using pyOpenSSL to do crypto and I/O.
    icCs”|jst‚|js"|jr;tg||ƒ|_tS|jƒ|jƒ|j	ƒt
j|jƒ|j
ƒ|_
|j
j|_|jƒtS(N(tTLStAssertionErrort
dataBuffert_tempDataBufferRt_tlsWaitingRDR!R.t	_startTLSRt
Connectiont
getContextRR8R/R2(Rtctxtextra((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pytstartTLS)s



cCsd|_t|jƒ|_dS(Ni(RNRLt	__class__(R((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyRS;s	cCs9|jdk	r%|jjj|ƒntj||ƒdS(N(RRR>tbufferedDatatappendR
R7(Rtbytes((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR7@scCs9|jdk	r%|jjj|ƒntj||ƒdS(N(RRR>RZtextendR
t
writeSequence(Rtiovec((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR^GscCsttj|ƒ}|jdk	rp|jrp|jrp|j}d|_|j|j|jƒ|j	|j
ƒqpn|S(N(R
R+RRR>RPRQRXtcontextRWR^RZ(RRBtwaiting((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyR+Ns		N(RFRGt__doc__RNR>RRR2RXRSR7R^R+(((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyRM!s			tClientMixincBs$eZdZeeƒdd„ZRS(sh
    Mixin for L{twisted.internet.tcp.Client} to implement the client part of
    L{ITLSTransport}.
    icCsB|jj|||ƒr>|r.|jjƒq>|jjƒndS(N(RRXRtset_connect_statetset_accept_state(RRVtclient((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyRXas(RFRGRbR	RRX(((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyRcZs
tServerMixincBs$eZdZeeƒdd„ZRS(sh
    Mixin for L{twisted.internet.tcp.Client} to implement the server part of
    L{ITLSTransport}.
    icCsB|jj|||ƒr>|r.|jjƒq>|jjƒndS(N(RRXRReRd(RRVtserver((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyRXqs(RFRGRbR	RRX(((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyRgjs
((!RbR6ttwisted.python.runtimeRterrnoRRRRRRtOpenSSLRtzope.interfaceR	ttwisted.pythonR
ttwisted.internet.interfacesRRttwisted.internet.abstractR
ttwisted.internet.mainRRttwisted.internet._sslRRRLtobjectRMRcRg(((s</usr/lib/python2.7/dist-packages/twisted/internet/_oldtls.pyt<module>s*î	9

Youez - 2016 - github.com/yon3zu
LinuXploit