403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/paste/evalexception/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyc
Ñò
“ÊIc@sàdZddkZddkZddkZddkZddklZddkZddkZddk	Z	ddk
Z
ddklZl
Z
lZddklZddklZddklZddklZdd	klZdd
klZddkZdZd„Zed
„Zd„Zd„Zd„Zd„Zeie e	i	ƒƒƒZ!d„Z"de#fd„ƒYZ$de#fd„ƒYZ%de
i&fd„ƒYZ'd„Z(d„Z)d„Z*d„Z+dZ,dd„Z.dS(sâ
Exception-catching middleware that allows interactive debugging.

This middleware catches all unexpected exceptions.  A normal
traceback, like produced by
``paste.exceptions.errormiddleware.ErrorMiddleware`` is given, plus
controls to see local variables and evaluate expressions in a local
context.

This can only be used in single-process environments, because
subsequent requests must go back to the same process that the
exception originally occurred in.  Threaded or non-concurrent
environments both work.

This shouldn't be used in production in any way.  That would just be
silly.

If calling from an XMLHttpRequest call, if the GET variable ``_`` is
given then it will make the response more compact (and less
Javascripty), since if you use innerHTML it'll kill your browser.  You
can look for the header X-Debug-URL in your 500 responses if you want
to see the full debuggable traceback.  Also, this URL is printed to
``wsgi.errors``, so you can open it up in another browser window.
iÿÿÿÿN(tStringIO(terrormiddlewaret	formattert	collector(twsgilib(t	urlparser(thttpexceptions(tregistry(trequest(tresponseiÈcCs(|djodStit|ƒdƒS(s;
    Escape HTML characters, plus translate None to ''
    tiN(tNonetcgitescapetstr(tv((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt
html_quote/s
cCsp|ot|ƒ}n|iddƒ}tidt|ƒ}tidt|ƒ}tidt|ƒ}d|S(sÊ
    Quote a value for HTML, preserving whitespace (translating
    newlines to ``<br>`` and multiple spaces to use ``&nbsp;``).

    If ``quote`` is true, then the value will be HTML quoted first.
    s
s<br>
s()(  +)s(\n)( +)s^()( +)s<code>%s</code>(Rtreplacetretsubt
_repl_nbsp(Rtquote((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytpreserve_whitespace7scCsMt|idƒƒdjodS|idƒdt|idƒƒddS(Niis&nbsp;t (tlentgroup(tmatch((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRFscs‡fd†}|S(s\
    A simple middleware that catches errors and turns them into simple
    tracebacks.
    cskyˆ||ƒSWnStƒ}tid|ƒ|ddgtiƒƒ|iƒ}dt|ƒgSXdS(Ntfiles500 Server Errorscontent-types	text/htmls<h3>Error</h3><pre>%s</pre>(scontent-types	text/html(Rt	tracebackt	print_exctsystexc_infotgetvalueR(tenvirontstart_responsetouttres(tapplication(sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytsimplecatcher_appPs	
((R%R&((R%sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt
simplecatcherKscCs
d„}|S(s=
    Turns a function or method into a WSGI application.
    cs‡fd†}t|_|S(Ncs„tˆƒdjo%ˆd}ˆd}ˆdg‰nˆ\}}g‰‡‡fd†}ti|ƒ}t|ƒ}|||ƒS(Niiiics„ti|dtƒ}tihdd6dd6ƒ}||d<||d<ˆˆ|iƒŽ}|idƒ}|||iƒƒ|gS(Ntinclude_get_varss	text/htmlscontent-types200 OKtstatusR!theaders(Rtparse_formvarstTrueR	t
HeaderDicttmixedtpoptheaderitems(R!R"tformR*R$R)(targstfunc(sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyR%ms	



(RRtmake_middlewareR'(R2R!R"R%tapp(R3(R2sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytwsgiapp_wrappercs

(R,texposed(R3R6((R3sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt	decoratorbs	((R8((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytwsgiapp^s	cs‡fd†}|S(s²
    A decorator (meant to be used under ``wsgiapp()``) that resolves
    the ``debugcount`` variable to a ``DebugInfo`` object (or gives an
    error if it can't be found).
    csÛy¦d|jotdƒ‚n|idƒ}yt|ƒ}Wntj
otdƒ‚nX||ijotd|ƒ‚n|i|}ˆ|d||SWn.tj
o"}d|dd<d	t|ƒSXdS(
Nt
debugcounts'You must provide a debugcount parametersBad value for debugcounts0Debug %s no longer found (maybe it has expired?)t
debug_infos500 Server ErrorR*R)s#<html>There was an error: %s</html>(t
ValueErrorR/tinttdebug_infosR(tselfR1R:R;te(R3(sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytdebug_info_replacement†s"

((R3RA((R3sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytget_debug_info€scCs2d|jo	|dStiƒ|d<}|SdS(s?
    Return the unique debug count for the current request
    spaste.evalexception.debug_countN(t
debug_countertnext(R!RD((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytget_debug_count›s
	t
EvalExceptioncBsÈeZddd„Zd„Zd„Zd„Zee_d„Z	ee	_d„Z
ee
_d„Zee_d„Zd„Z
eƒee
ƒƒZ
d	„ZeƒeeƒƒZd
„Zd„ZRS(
cCsY||_h|_|djo-|djo
d}qL|iddƒ}n||_dS(Nt_txmlhttp_key(R%R>RtgetRH(R?R%tglobal_confRH((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt__init__§s		


cCsa|dp
td‚||d<|iddƒidƒo|i||ƒS|i||ƒSdS(Nswsgi.multiprocesssIThe EvalException middleware is not usable in a multi-process environmentspaste.evalexceptiont	PATH_INFOR
s/_debug/(tAssertionErrorRIt
startswithtdebugtrespond(R?R!R"((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt__call__²s
cCs¼ti|ƒdjpt‚ti|ƒ}t||dƒ}|p3tid|ti|ƒfƒ}|i	||ƒSt|dt
ƒp$tid|ƒ}|i	||ƒS|||ƒS(Nt_debugs%r not found when parsing %rR7s%r not allowed(Rt
path_info_popRMtgetattrRRtHTTPNotFoundRt
construct_urltwsgi_applicationtFalset
HTTPForbidden(R?R!R"t	next_parttmethodtexc((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRO¼s
cCs7titiitiitƒdƒƒ}|||ƒS(s?
        Static path where images and other files live
        tmedia(RtStaticURLParsertostpathtjointdirnamet__file__(R?R!R"R5((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyR]Ës$cCs7titiitiitƒdƒƒ}|||ƒS(s2
        Static path where MochiKit lives
        tmochikit(RR^R_R`RaRbRc(R?R!R"R5((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRdÔs$cCsi|ddgƒg}|iiƒ}|id„ƒg}|D]}||iƒq@~}t|ƒgS(s[
        Returns a JSON-format summary of all the cached
        exception reports
        s200 OKsContent-typestext/x-jsoncSst|i|iƒS((tcmptcreated(tatb((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt<lambda>ås(sContent-typestext/x-json(R>tvaluestsorttjsontrepr(R?R!R"tdatatitemst_[1]titem((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytsummaryÝs'cCs^tti|ƒƒ}||ijo|ddgƒd|gS|i|}|i||ƒS(s,
        View old exception reports
        s500 Server ErrorsContent-types	text/htmlsHTraceback by id %s does not exist (maybe the server has been restarted?)(sContent-types	text/html(R=RRSR>RW(R?R!R"tidR;((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytviewês
	
cCs|d|S(Ns/_debug/view/%s((R?R!t	base_pathtcount((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt
make_view_urlûscKso|it|ƒƒ}|ii}|o0tii|iƒt|ƒ}tii	ƒnd}t
||ƒ|S(Ns
No local vars(tframeR=ttb_frametf_localsRtrestorertrestoration_begintcountert
make_tabletrestoration_endt
input_form(R?ttbidR;tkwRxtvarst
local_vars((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt
show_framescKs¿|iƒpdS|iƒd}|it|ƒƒ}|ii}|ii}ti||ƒ}t	i
i|iƒ|i
|ƒ}	t	i
iƒti|ƒ}
dt|
dtƒt|	ƒfS(NR
s
sD<code style="color: #060">&gt;&gt;&gt;</code> <code>%s</code><br>
%sR(tstriptrstripRxR=RyRzt	f_globalstevalcontexttEvalContextRR{R|R}t	exec_exprRRtstr2htmlRRX(R?RR;tinputR‚RxRƒt	glob_varstcontexttoutputt
input_html((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt
exec_inputs

csQ|idƒo|i|ˆƒSti|dtdtƒ}t|d<g‰d‡‡fd†}y^ti||f}|i||ƒ}zt	|ƒ}|SWdt
|dƒo|iƒnXWn‹ti
ƒ}x5|idgƒD]!}	t|d|	ƒo‚qäqäWtii|ƒt|ƒ}
|i|||
ƒ}ˆp0dg}|id
|fƒˆd||ƒn|did
|ƒti|Œ}
t|
||
|||ƒ}|
|ijpt‚||i|
<|iodti|ƒ}t|ƒi|iƒo8ti|Œ}
ti |
dtdtdtƒ}|gSn|i!ƒSXdS(Nspaste.throw_errorstwith_path_infotwith_query_stringcs2yˆ|||ƒSWn
‚nXˆitƒdS(N(tappendR,(R)R*R(tstartedR"(sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytdetect_start_response)s
tclosespaste.expected_exceptionsiscontent-types	text/htmlsX-Debug-URLs500 Internal Server Errorswsgi.errorss
Debug at: %s
tinclude_hidden_framestinclude_reusabletshow_extra_data(scontent-types	text/html("RIR%RRVRXR,RRt
SupplementtlistthasattrR˜RRt
isinstanceRR{tsave_registry_stateRERwR•twriteRtcollect_exceptiont	DebugInfoR>RMRHRtparse_querystringtdictRtformat_htmltcontent(R?R!R"RuR—t__traceback_supplement__tapp_itertreturn_iterRtexpectedRvtview_uriR*texc_dataR;tget_varsthtml((R"R–sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRP"sZ	
	

c	Cslt}|io6ti|ƒ}t|ƒi|iƒo
t}qFnti||ddtdtd|ƒS(Nswsgi.errorsR¯t
debug_modetsimple_html_error(	RXRHRR¤R¥RIR,Rthandle_exception(R?RR!R±R®((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytexception_handler_s

N(t__name__t
__module__RRKRQROR]R,R7RdRrRtRwR…R9RBR’RPR³(((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRF¥s&
	
													=R£cBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(c
Csã||_||_||_||_||_tiƒ|_|\|_|_|_	d}g|_
d}|i	}	xj|	dj	o\tdjp
|tjoB|	i
iidƒoPn|i
i|	ƒ|	i}	|d7}quWdS(Niit__exception_formatter__(R}R­RuR!R¬ttimeRftexc_typet	exc_valuettbtframesRtlimitRyRzRIR•ttb_next(
R?R}RR­RuR!R¬R¶tnRº((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRKms$							'	cCsWh|id6tidti|iƒƒd6|id6t|iƒd6t|iƒd6S(s2Return the JSON-able representation of this objectturis%cRftcreated_timestamptexception_typet	exception(R¬R·tstrftimetgmtimeRfRR¸R¹(R?((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRl‚s

cCsFx?|iD]}t|ƒ|jo|Sq
Wtd||if‚dS(NsNo frame by id %s found from %r(R»RsR<(R?RRx((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRxŒs
	cCs|ddgƒ|iƒS(Ns200 OKscontent-types	text/html(scontent-types	text/html(R§(R?R!R"((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRW”scCswt|i|i|iƒ}titi}||iƒ7}t|i	ƒ}t
h|pdd6|d6|d6}|gS(NR
t
repost_buttont	head_htmltbody(tformat_eval_htmlR­RuR}Rt	error_cssthide_display_jsteval_javascripttmake_repost_buttonR!terror_template(R?R¯RÆRÅtpage((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyR§˜scCs$|id}d||||ifS(Ns/_debugsÕ<script type="text/javascript" src="%s/mochikit/MochiKit.js"></script>
<script type="text/javascript" src="%s/media/debug.js"></script>
<script type="text/javascript">
debug_base = %r;
debug_count = %r;
</script>
(RuR}(R?Ru((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRË£s
(R´RµRKRlRxRWR§RË(((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyR£ks		
			tEvalHTMLFormattercBseZd„Zd„ZRS(cKs,tt|ƒi|||_||_dS(N(tsuperRÏRKRuR}(R?RuR}R‚((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRK²s	cCs0tii|||ƒ}|d|i|ifS(Ns­  <a href="#" class="switch_source" tbid="%s" onClick="return showFrame(this)">&nbsp; &nbsp; <img src="%s/_debug/media/plus.jpg" border=0 width=9 height=9> &nbsp; &nbsp;</a>(Rt
HTMLFormattertformat_source_lineRRu(R?tfilenameRxtline((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRÒ·s
	(R´RµRKRÒ(((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRϰs	c	CsVt|tƒo|iƒ}|iƒng}d}x|D]\}}|d7}tƒ}yti||ƒWn#tj
o}|d|IJnXt|iƒƒ}t	|ƒdjo0|}|d }|d7}|d|d7}nt
i|ƒ}|do
d}nd	}|id
|t|ƒt
|dtƒfƒq=Wdd
i|ƒS(Niis	Error: %sidsj<a class="switch_source" style="background-color: #999" href="#" onclick="return expandLong(this)">...</a>s%<span style="display: none">%s</span>is
 class="even"s class="odd"s[<tr%s style="vertical-align: top;"><td><b>%s</b></td><td style="overflow: auto">%s<td></tr>Rs<table>%s</table>s
(RŸR¥RoRkRtpprintt	ExceptionRR RRtmake_wrappableR•RRXRa(	RotrowstitnametvalueR#R@t
orig_valuetattr((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyR~Ás8
	


	c	CsÈtd|d|dtƒ}|i|ƒ}td|d|dtdtdtƒ}|i|ƒ}ti|dtƒ}|i|iƒ|i|iƒjod|}nd}d||ti	|ƒfS(	NRuR}Rštshow_hidden_framesR›s¼
    <br>
    <script type="text/javascript">
    show_button('full_traceback', 'full traceback')
    </script>
    <div id="full_traceback" class="hidden-data">
    %s
    </div>
        R
sú
    %s
    %s
    <br>
    <script type="text/javascript">
    show_button('text_version', 'text version')
    </script>
    <div id="text_version" class="hidden-data">
    <textarea style="width: 100%%" rows=10 cols=60>%s</textarea>
    </div>
    (
RÏRXtformat_collected_dataR,Rtformat_textt
filter_framesR»RR
(	R­RuR}tshort_formattertshort_ertlong_formattertlong_erttext_ertfull_traceback_html((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRÈâs$		cCs1ti|ƒ}|ddjo	d|SdSdS(NtREQUEST_METHODtGETsB<button onclick="window.location.href=%r">Re-GET Page</button><br>(RRVR(R!turl((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyRÌscCsdh|d6S(Ns~
<form action="#" method="POST"
 onsubmit="return submitInput($('submit_%(tbid)s'), %(tbid)s)">
<div id="exec-output-%(tbid)s" style="width: 95%%;
 padding: 5px; margin: 5px; border: 2px solid #000;
 display: none"></div>
<input type="text" name="input" id="debug_input_%(tbid)s"
 style="width: 100%%"
 autocomplete="off" onkeypress="upArrow(this, event)"><br>
<input type="submit" value="Execute" name="submitbutton"
 onclick="return submitInput(this, %(tbid)s)"
 id="submit_%(tbid)s"
 input-from="debug_input_%(tbid)s"
 output-to="exec-output-%(tbid)s">
<input type="submit" value="Expand"
 onclick="return expandInput(this)">
</form>
 R((RR;((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyR€*ssE
<html>
<head>
 <title>Server Error</title>
 %(head_html)s
</head>
<body>

<div id="error-area" style="display: none; background-color: #600; color: #fff; border: 2px solid black">
<div id="error-container"></div>
<button onclick="return clearError()">clear this</button>
</div>

%(repost_button)s

%(body)s

</body>
</html>
cCs3|djo|iddƒ}nt|d|ƒS(s¶
    Wraps the application in an interactive debugger.

    This debugger is a major security hole, and should only be
    used during development.

    xmlhttp_key is a string that, if present in QUERY_STRING,
    indicates that the request is an XMLHttp request, and the
    Javascript/interactive debugger should not be returned.  (If you
    try to put the debugger somewhere with innerHTML, you will often
    crash the browser)
    RHRGN(RRIRF(R5RJRH((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pytmake_eval_exceptionSs

(/t__doc__RR_RRt	cStringIORRÕt	itertoolsR·Rtpaste.exceptionsRRRtpasteRRRRRR	R‰R¼RR,RRR'R9RBRvR=RCREtobjectRFR£RÑRÏR~RÈRÌR€RÍRRë(((sB/usr/lib/python2.6/site-packages/paste/evalexception/middleware.pyt<module>sF				"		
ÆE	!	*		'

Youez - 2016 - github.com/yon3zu
LinuXploit