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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/spread/banana.pyc
ó
[³XMc@s\dZddlZddlZddlZddlmZddlmZddlm	Z	de
fd„ƒYZd„Zd	„Z
ed
ƒZedƒZedƒZed
ƒZedƒZedƒZedƒZedƒZed
ƒZd„ZedƒdZdejejfd„ƒYZeƒZejƒejdƒd„Z d„Z!dS(sé
Banana -- s-exp based protocol.

Future Plans: This module is almost entirely stable.  The same caveat applies
to it as applies to L{twisted.spread.jelly}, however.  Read its future plans
for more details.

@author: Glyph Lefkowitz
iÿÿÿÿN(tprotocol(tstyles(tlogtBananaErrorcBseZRS((t__name__t
__module__(((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyRscCsg|dkr |tdƒƒdS|dks8tdƒ‚x(|rb|t|d@ƒƒ|d?}q;WdS(Nis!can only encode positive integersii(tchrtAssertionError(tintegertstream((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytint2b128s	cCsEd}d}x2|D]*}t|ƒ}|||7}|dK}qW|S(sû
    Convert an integer represented as a base 128 string into an C{int} or
    C{long}.

    @param st: The integer encoded in a string.
    @type st: C{str}

    @return: The integer value extracted from the string.
    @rtype: C{int} or C{long}
    iii(tord(tsttetitchartn((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytb1282int"s
i€ii‚iƒi„i…i†i‡cCs
|adS(sk
    Set the limit on the prefix length for all Banana connections
    established after this call.

    The prefix length limit determines how many bytes of prefix a banana
    decoder will allow before rejecting a potential object as too large.

    @type limit: C{int}
    @param limit: The number of bytes of prefix for banana to allow when
    decoding.
    N(t
_PREFIX_LIMIT(tlimit((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytsetPrefixLimitDs
i@i€itBananacBs˜eZddgZdLZeZd„Zd„Zd„Z	d„Z
d„Zd„ZdZ
d	„Zd
„Zidd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6ZiZx$ejƒD]\ZZeee<q^WddI„ZdJ„ZdK„ZRS(MtpbtnonecCsJ||_d|dd|_d|_d	|_d|dd|_dS(
st
        Set the prefix limit for decoding done by this protocol instance.

        @see: L{setPrefixLimit}
        iiiiNI€i€I€iÿÿÿ(tprefixLimitt_smallestLongIntt_smallestIntt_largestIntt_largestLongInt(tselfR((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyR\s
			cCsdS(sPSurrogate for connectionMade
        Called after protocol negotiation.
        N((R((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytconnectionReadyiscCs||_|jƒdS(N(tcurrentDialectR(Rtdialect((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyt_selectDialectns	cCsº|jr|j|ƒn|jr}x‘|D]3}||jkr)|j|ƒ|j|ƒPq)q)Wtjdƒ|jj	ƒn9||jkrœ|j|ƒntjdƒ|jj	ƒdS(NsSThe client doesn't speak any of the protocols offered by the server: disconnecting.sYThe client selected a protocol the server didn't suggest and doesn't know: disconnecting.(
RtexpressionReceivedtisClientt
knownDialectstsendEncodedR!Rtmsgt	transporttloseConnection(Rtobjt	serverVer((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytcallExpressionReceivedrs		




cCs6|jtƒd|_|js2|j|jƒndS(N(RRtNoneRR#R%R$(R((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytconnectionMades
		cCs8|j}|r'|ddj|ƒn
|j|ƒdS(Niÿÿÿÿi(t	listStacktappendR+(Rtitemtl((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytgotItem”s	tcCse|j|}|j}|j}x6|rW|j|ks\tdt|jƒt|ƒfƒ‚||_d}xT|D] }|tkrˆPn|d}qrW||jkr¾td|jfƒ‚ndS|| }||}||d}	t|ƒ|jkrtd|jfƒ‚n|t	krat
|ƒ}|tkrEtdƒ‚n|j|gfƒ|	}nª|t
krÈt
|ƒ}|tkr”tdƒ‚nt|	ƒ|krÁ|	|}||	| ƒqdSnC|tkró|	}t
|ƒ}||ƒn|tkr|	}t
|ƒ}||ƒní|tkrJ|	}t
|ƒ}||ƒnÁ|tkrv|	}t
|ƒ}||ƒn•|tkr¨|	}t
|ƒ}||j|ƒnc|tkrøt|	ƒdkrñ|	d}|tjd	|	d ƒdƒqdSntd
|fƒ‚xF|rSt|ddƒ|ddkrS|jƒd}
||
ƒqWq"Wd|_dS(
NsThis ain't right: %s %siis1Security precaution: more than %d bytes of prefixs9Security precaution: longer than %d bytes worth of prefixs#Security precaution: List too long.s%Security precaution: String too long.is!dsInvalid Type Byte %riÿÿÿÿR3(tbufferR.R2RtreprtHIGH_BIT_SETRRtlentLISTRt
SIZE_LIMITR/tSTRINGtINTtLONGINTtLONGNEGtNEGtVOCABtincomingVocabularytFLOATtstructtunpacktNotImplementedErrortpop(RtchunkR4R.R2tpostchtnumttypebytetrestR0((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytdataReceiveds~
			4	


	





!+cCs
tƒ‚dS(sFCalled when an expression (list, string, or int) is received.
        N(RD(Rtlst((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyR"ãsiR,itclassitdereferenceit	referenceit
dictionaryitfunctionitinstanceitlisti	tmodulei
t
persistentittupleit
unpersistablei
tcopyitcacheitcacheditremoteitlocalitlcacheitversionitloginitpasswordit	challengeit	logged_init
not_logged_initcachemessageitmessageitansweriterroritdecrefitdecacheituncachecCs4g|_tj|jƒ|_d|_||_dS(Ni(R.RYtoutgoingVocabularytoutgoingSymbolstoutgoingSymbolCountR#(RR#((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyt__init__s		cCs?tjƒ}|j||jƒ|jƒ}|jj|ƒdS(N(t	cStringIOtStringIOt_encodetwritetgetvalueR'(RR)tiotvalue((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyR%scCsVt|ttfƒr„t|ƒtkrCtdt|ƒfƒ‚ntt|ƒ|ƒ|tƒxï|D]}|j||ƒqgWnÎt|t	t
fƒra||jks·||jkrÍtd|fƒ‚n||j
kr÷t||ƒ|tƒqR|dkrt||ƒ|tƒqR||jkrGt||ƒ|tƒqRt||ƒ|tƒnñt|tƒr“|tƒ|tjd|ƒƒn¿t|tƒr?|jdkrç||jkrç|j|}t||ƒ|tƒqRt|ƒtkrtdt|ƒfƒ‚ntt|ƒ|ƒ|tƒ||ƒntd|fƒ‚dS(Ns#list/tuple is too long to send (%d)s"int/long is too large to send (%d)is!dRsstring is too long to send (%d)scould not send object: %r(t
isinstanceRTRWR7R9RR
R8RrtinttlongRRRR=R>RR;R<tfloatRARBtpacktstrRRmR?R:(RR)RstelemtsymbolID((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyRr sL













N(RRR$R,RR9t	sizeLimitRRR!R+R-R2R4RLR"RlR@titemstktvRoR%Rr(((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyRVsd	
						F	
	RcCs,tjƒ}|t_tj|ƒ|jƒS(sEncode a list s-expression.(RpRqt_iR'R%Rt(RMRu((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytencodeSs	
cCs>g}|jt_ztj|ƒWddt_t`X|dS(s)
    Decode a banana-encoded string.
    NR3i(R/RƒR"RLR4(RR1((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pytdecode[s	i
("t__doc__RYRpRBttwisted.internetRttwisted.persistedRttwisted.pythonRt	ExceptionRR
RRR8R;R:R>RAR<R=R?R6RR9tProtocolt	EphemeralRRƒR-R!R„R…(((s9/usr/lib/python2.7/dist-packages/twisted/spread/banana.pyt<module>
s2$	
		
ø	

	

Youez - 2016 - github.com/yon3zu
LinuXploit