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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/twisted/manhole/service.pyc
ó
[³XMc@sadZddlmZddlmZddlmZmZddlm	Z	ddl
mZddlm
Z
mZddlZdd	lmZddlZddlZddlZddlZd
dd„ƒYZdefd
„ƒYZddddded„Zd„Zidd6Zdejfd„ƒYZddd„ƒYZdej fd„ƒYZ dS(sDL{twisted.manhole} L{PB<twisted.spread.pb>} service implementation.
iÿÿÿÿ(t	copyright(tpb(tlogtfailure(tportal(tservice(t
implementst	InterfaceN(tStringIOt	FakeStdIOcBs,eZd„Zd„Zd„Zd„ZRS(cCs||_||_dS(N(ttypetlist(tselfttype_R((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyt__init__s	cCsFtjd|jtjt|ƒƒfƒ|jj|j|fƒdS(Ns%s: %s(RtmsgR
tstringtstriptstrRtappend(Rttext((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytwrite"s)cCsdS(N((R((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytflush&sc	Csã|js
dS|j}g}|d}d}x°tdt|jƒƒD]–}||\}}||krmqEqE||dkr‘|j||ƒn>td„|||!ƒ}tj|dƒ}|j||fƒ|}|}qEWdS(s³Concatenate adjacent messages of same type into one.

        Greatly cuts down on the number of elements, increasing
        network transport friendliness considerably.
        NiicSs|dS(Ni((tl((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyt<lambda>>st(RtxrangetlenRtmapRtjoin(	Rtinlisttoutlistt	last_typetblock_begintitmtypetmessagetmessages((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytconsolidate)s$		
	(t__name__t
__module__RRRR&(((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyR	s			tIManholeClientcBs#eZd„Zd„Zd„ZRS(cCsdS(sOTakes a list of (type, message) pairs to display.

        Types include:
            - "stdout" -- string sent to sys.stdout

            - "stderr" -- string sent to sys.stderr

            - "result" -- string repr of the resulting value
                 of the expression

            - "exception" -- a L{failure.Failure}
        N((tlist_of_messages((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytconsoleGscCsdS(s&Receives an explorer.Explorer
        N((txplorer((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytreceiveExplorerUscCsdS(scList what manholey things I am capable of doing.

        i.e. C{"Explorer"}, C{"Failure"}
        N((((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytlistCapabilitiesYs(R'R(R+R-R.(((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyR)Fs		cCsâg}td|ƒ}	td|ƒ}
td|ƒ}d}d}
|dkrZt|ƒ}n|dkrod}n|dkr„i}n|dkr™|}n|dkrÁt|ƒrÁtdƒ‚ny°tj}tj}|	t_|
t_zrt|ƒrt|||ƒ}
nMyt	||dƒ}Wnt	||dƒ}nX|rYt
|||ƒ}
nWd|t_|t_XWnMtjƒ\}}}tj
|||ƒ}~|jtj||ƒƒnX|rÞ|	jƒ||ƒn|
S(	s€Run this, directing all output to the specified console.

    If command is callable, it will be called with the args and keywords
    provided.  Otherwise, command will be compiled and eval'd.
    (Wouldn't you like a macro?)

    Returns the command's return value.

    The console is called with a list of (type, message) pairs for
    display, see L{IManholeClient.console}.
    tstdouttstderrt	exceptions,Need a namespace to evaluate the command in.tevaltsingleN((R	tNoneRtcallablet
ValueErrortsysR/R0tapplytcompileR2texc_infoRtFailureRRtfailure2CopyableR&(tcommandR+tglobalNStlocalNStfilenametargstkwtunsafeTracebackstoutputtfakeouttfakeerrterrfiletcodetvaltoutterrteTypeteValttbtfail((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytrunInConsole_sR
								

c	Csƒddl}g}xJ|jD]?}|j|d|d|d|j|d|dƒfƒqWi|d6tj|j|jƒd6S(sòPre-Failure manhole representation of exceptions.

    For compatibility with manhole clients without the "Failure"
    capability.

    A dictionary with two members:
        - 'traceback' -- traceback.extract_tb output; a list of tuples
             (filename, line number, function name, text) suitable for
             feeding to traceback.format_list.

        - 'exception' -- a list of one or more strings, each
             ending in a newline. (traceback.format_exception_only output)
    iÿÿÿÿNiiit	tracebackR1(t	linecachetframesRtgetlineRQtformat_exception_onlyR
tvalue(RORRRNtf((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyt_failureOldStyle s=tSettExplorertPerspectivecBsƒeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„ZRS(icCs4i|d6|d6dd6|_i|_||_dS(NRtavatart_(R4tlocalNamespacetclientsR(RR((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyRÁs
	cCs>|jjƒ}i|d<|djdƒr:|dd=n|S(NR_R^t__builtins__(t__dict__tcopythas_key(Rtstate((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyt__getstate__Ês

cCsÆ||j|<djtt|jjjƒdƒƒ}|jjit	|dt|ƒƒd6|d6t
jd6}|jdd|fgƒt
|_|jd	ƒj|j|jd
|fd|fƒdS(
sHA client has attached -- welcome them and add them to the list.
        t:itnametyouthosttlongversionR+R/R.tcallbackArgsterrbackArgsN(R_RRRtbrokert	transporttgetHostRtwelcomeMessagetgetattrRRjt
callRemotet_defaultCapabilitiestcapabilitiestaddCallbackst_cbClientCapablet_ebClientCapable(RtclienttidentityRiR((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytattachedÑs
(	cCs&y|j|=Wntk
r!nXdS(N(R_tKeyError(RRxRy((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytdetachedås
cOsCt||j|jj|jt|jƒd|d|d|jjƒS(s:Convience method to "runInConsole with my stuff".
        RARBRC(RPR+Rt	namespaceR^RRC(RR=RARB((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyRPës	cCs|jjƒ}|}d}xø|D]ð}yÃ|jjdƒsÚ|dkrÇ|}xttt|ƒƒD]]}||ddkrct||dtj	ƒrc||dt
||dƒf||<qcqcWn|jd|ƒn|jd|ƒWq"tj
k
r|j|dƒq"Xq"WdS(s/Pass a message to my clients' console.
        R;iR1iR+N(R_tkeysR4RtRcRRt
isinstanceRR;RXRrRt
ProtocolErrorR|(RR$R_torigMessaget
compatMessageRxR"((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyR+ús"
%cCs_|jjƒ}xI|D]A}y|jd|ƒWqtjk
rV|j|dƒqXqWdS(s+Pass an Explorer on to my clients.
        R-N(R_R~RrRR€R|R4(Rt
objectLinkR_Rx((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyR-s
cCs$|jdd||ffgƒ|S(NtresultsDeferred #%s Result: %r
(R+(RRItdnum((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyt	_cbResults cCs*tjdt|ƒ|fƒ||_dS(Nsclient %x has %s(RRtidRt(RRtRx((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyRv"scCs%|jtƒtjd|fƒdS(Ns5Couldn't get capabilities from %s, assuming defaults.(ttraptAttributeErrorRR(RtreasonRx((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyRw&s
	cCsÑtjd|ƒ|j|ƒ}|d
k	rÀ||jd<ddlm}t||ƒr|jd7_|j	dd|jfgƒ|j
|j|jƒqÀ|j	dt|ƒdfgƒntjd	ƒd
S(sÈEvaluate the given expression, with output to the console.

        The result is stored in the local variable '_', and its repr()
        string is sent to the console as a "result" message.
        s>>> %sR]iÿÿÿÿ(tDeferrediR„sWaiting for Deferred #%s...
s
s<<<N(
RRRPR4R^ttwisted.internet.deferR‹RtlastDeferredR+taddBothR†trepr(RtexprRIR‹((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytperspective_do-s
#cCs>|j|ƒ}|r:tjj||ƒ}|j|ƒndS(s¬Browse the object obtained by evaluating the identifier.

        The resulting ObjectLink is passed back through the client's
        receiveBrowserObject method.
        N(RPtexplorertexplorerPooltgetExplorerR-(Rt
identifiertobjecttexpl((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytperspective_exploreAscCsit‚|j|ƒ}|re|j|jj||ƒ}|j|ƒ|j|jj|||jƒndS(sÜWatch the object obtained by evaluating the identifier.

        Whenever I think this object might have changed, I will pass
        an ObjectLink of it back to the client's receiveBrowserObject
        method.
        N(tNotImplementedErrorRPtbrowsertbrowseObjectR-twatchObject(RR•R–toLink((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pytperspective_watchLs
(R'R(RRReRzR|RPR+R-R†RvRwR‘R˜Rž(((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyR[¿s													tRealmcBs'eZeejƒd„Zd„ZRS(cCs||_i|_dS(N(Rt_cache(RR((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyRds	cstj|krtdƒ‚nˆ|jkr=|jˆ‰nt|jƒ‰ˆjˆˆƒ‡‡‡fd†}tjˆ|fS(Nsno interfacecsˆjˆˆƒdS(N(R|((tptavatarIdtmind(s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyR|ps(RtIPerspectiveR™R R[RRz(RR¢R£t
interfacesR|((R£R¡R¢s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyt
requestAvatarhs(R'R(RRtIRealmRR¦(((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyRŸ`s
	tServicecBs&eZdZedd„Zd„ZRS(sB
Hello %(you)s, welcome to Manhole on %(host)s.
%(longversion)s.

cCsJ||_idt|ƒfd6td6|_|rF|jj|ƒndS(Ns
__manhole%x__R'R7(RCR‡R7R}tupdate(RRCR}((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyR|s	
cCsF|jjƒ}|djƒ}||d<|jdƒrB|d=n|S(sAThis returns the persistent state of this shell factory.
        R}R`(RaRbRc(Rtdicttns((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyRe…s

N(R'R(RptFalseR4RRe(((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyR¨us	(((!t__doc__ttwistedRttwisted.spreadRttwisted.pythonRRttwisted.credRttwisted.applicationRtzope.interfaceRRR’t	cStringIORRR7RQttypesR	R)R4R¬RPRXRstAvatarR[RŸR¨(((s;/usr/lib/python2.7/dist-packages/twisted/manhole/service.pyt<module>s,)@	
¡

Youez - 2016 - github.com/yon3zu
LinuXploit