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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/paste/proxy.pyc
Ñò
•ÊIc
@s§dZddkZddkZddkZddklZddklZdZd
e	fd„ƒYZ
ddd„Zde	fd„ƒYZd„Z
ddd„ZdS(sæ
An application that proxies WSGI requests to a remote server.

TODO:

* Send ``Via`` header?  It's not clear to me this is a Via in the
  style of a typical proxy.

* Other headers or metadata?  I put in X-Forwarded-For, but that's it.

* Signed data of non-HTTP keys?  This would be for things like
  REMOTE_USER.

* Something to indicate what the original URL was?  The original host,
  scheme, and base path.

* Rewriting ``Location`` headers?  mod_proxy does this.

* Rewriting body?  (Probably not on this one -- that can be done with
  a different middleware that wraps this middleware)

* Example::  
    
    use = egg:Paste#proxy
    address = http://server3:8680/exist/rest/db/orgs/sch/config/
    allowed_request_methods = GET
  
iÿÿÿÿN(thttpexceptions(tasliststransfer-encodingt
connections
keep-alivesproxy-authenticatesproxy-authorizationttettrailerstupgradetProxycBs eZddd„Zd„ZRS(cCs¿||_ti|ƒ|_|idiƒ|_|id|_|id|_g}|D]}|o||iƒq\q\~|_g}|D]}|o||iƒq‘q‘~|_	dS(Niii(
taddressturlparseturlsplittparsedtlowertschemethosttpathtallowed_request_methodstsuppress_http_headers(tselfRRRt_[1]txt_[2]((s//usr/lib/python2.6/site-packages/paste/proxy.pyt__init__6s	5cCsë|io1|diƒ|ijotidƒ||ƒS|idjo
ti}n:|idjo
ti}ntd|i	|ifƒ‚||i
ƒ}h}xx|iƒD]j\}}|idƒoN|diƒi
dd	ƒ}|d
jp||ijoq³n|||<q³q³W|i
|d
<d|jo|d|d<n|id
ƒo|d
|d<n|idƒo5|d|d<t|dƒ}|di|ƒ}	nd}	ti|dƒ}
|io>|
}|ddjo|d}nti|i|ƒ}n|
}|idƒo|d|d7}n|i|d||	|ƒ|iƒ}
t|
iƒ}d|
i|
if}|||ƒ|
idƒ}|dj	o|
it|ƒƒ}	n
|
iƒ}	|iƒ|	gS(NtREQUEST_METHODt
DisallowedthttpthttpssUnknown scheme for %r: %rtHTTP_it_t-R
tREMOTE_ADDRsx-forwarded-fortCONTENT_TYPEscontent-typetCONTENT_LENGTHscontent-lengths
wsgi.inputtt	PATH_INFOit/itQUERY_STRINGt?s%s %s( RRRtHTTPBadRequestRthttplibtHTTPConnectiontHTTPSConnectiont
ValueErrorRR
titemst
startswithtreplaceRtgettinttreadturllibtquoteRRturljointrequesttgetresponset
parse_headerstmsgtstatustreasont	getheadertNonetclose(Rtenvirontstart_responset	ConnClasstconntheaderstkeytvaluetlengthtbodyt	path_infotrequest_pathRtrestheaders_outR7((s//usr/lib/python2.6/site-packages/paste/proxy.pyt__call__Csd











(((t__name__t
__module__RRI(((s//usr/lib/python2.6/site-packages/paste/proxy.pyR4sR cCs.t|ƒ}t|ƒ}t|d|d|ƒS(s¸
    Make a WSGI application that proxies to another address:
    
    ``address``
        the full URL ending with a trailing ``/``
        
    ``allowed_request_methods``:
        a space seperated list of request methods (e.g., ``GET POST``)
        
    ``suppress_http_headers``
        a space seperated list of http headers (lower case, without
        the leading ``http_``) that should not be passed on to target
        host
    RR(RR(tglobal_confRRR((s//usr/lib/python2.6/site-packages/paste/proxy.pyt
make_proxy€stTransparentProxycBs/eZdZddd„Zd„Zd„ZRS(s$
    A proxy that sends the request just as it was given, including
    respecting HTTP_HOST, wsgi.url_scheme, etc.

    This is a way of translating WSGI requests directly to real HTTP
    requests.  All information goes in the environment; modify it to
    modify the way the request is made.

    If you specify ``force_host`` (and optionally ``force_scheme``)
    then HTTP_HOST won't be used to determine where to connect to;
    instead a specific host will be connected to, but the ``Host``
    header in the request will remain intact.
    RcCs||_||_dS(N(t
force_hosttforce_scheme(RRORP((s//usr/lib/python2.6/site-packages/paste/proxy.pyR¨s	cCs,d|iitt|ƒƒ|i|ifS(Ns%<%s %s force_host=%r force_scheme=%r>(t	__class__RJthextidRORP(R((s//usr/lib/python2.6/site-packages/paste/proxy.pyt__repr__­s	cCsÚ|d}|idjo
|}n
|i}|djo
ti}n+|djo
ti}ntd|ƒ‚d|jotdƒ‚n|d}|idjo
|}n
|i}||ƒ}h}	xT|iƒD]F\}
}|
idƒo*|
di	ƒi
d	d
ƒ}
||	|
<qÚqÚW||	d<d|jod
|jo|d|	d<n|idƒo|d|	d<n|idƒo't|dƒ}|di
|ƒ}
n*d|jod}
d}n
d}
d}|iddƒ|iddƒ}ti|ƒ}d|jo|d|d7}n|i|d||
|	ƒ|iƒ}t|iƒ}d|i|if}|||ƒ|idƒ}|dj	o|i
t|ƒƒ}
n
|i
ƒ}
|iƒ|
gS(Nswsgi.url_schemeRRsUnknown scheme %rt	HTTP_HOSTs*WSGI environ must contain an HTTP_HOST keyRiRRR
RtHTTP_X_FORWARDED_FORsx-forwarded-forRscontent-typeRs
wsgi.inputR itSCRIPT_NAMER!R#R$Rs%s %sscontent-length(ROR:RPR&R'R(R)R*R+RR,R-R.R/R0R1R3R4R5R6R7R8R9R;(RR<R=Rtconn_schemeR>R
t	conn_hostR?R@RARBRCRDRRGRHR7((s//usr/lib/python2.6/site-packages/paste/proxy.pyRI³sl

	








	









N(RJRKt__doc__R:RRTRI(((s//usr/lib/python2.6/site-packages/paste/proxy.pyRN˜s
	cCsg}x÷|iD]ì}|pqn|diƒo[|ptd|ƒ‚n|iƒ\}}|d|iƒ}|i||fƒqny|iddƒ\}}Wntd|ƒ‚nX|iƒ}|iƒtjo|i||fƒqqW|S(sB
    Turn a Message object into a list of WSGI-style headers.
    is%First header starts with a space (%r)t t:isInvalid header: %r(	R@tisspaceR)tpoptstriptappendtsplitRtfiltered_headers(tmessageRHtfull_headertlast_headert
last_valueRBtheader((s//usr/lib/python2.6/site-packages/paste/proxy.pyR5òs*
RcCstd|d|ƒS(s
    Create a proxy that connects to a specific host, but does
    absolutely no other filtering, including the Host header.
    RORP(RN(RLRORP((s//usr/lib/python2.6/site-packages/paste/proxy.pytmake_transparent_proxy
s(stransfer-encodingRs
keep-alivesproxy-authenticatesproxy-authorizationRRR(RZR&RR0tpasteRtpaste.util.convertersRRbtobjectRRMRNR5R:Rh(((s//usr/lib/python2.6/site-packages/paste/proxy.pyt<module>s&LZ	

Youez - 2016 - github.com/yon3zu
LinuXploit