403Webshell
Server IP : 39.108.156.168  /  Your IP : 216.73.216.104
Web Server : nginx/1.24.0
System : Linux e2.ksyuki.com 6.11.0-25-generic #25~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:20:50 UTC 2 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyc
�
�,�^c@s�ddlmZddlZddlZddlmZddlmZdefd��YZ	d�Z
ejej�defd	��Y�Z
d
e
fd��YZde
fd
��YZdefd��YZdS(i����(tunicode_literalsN(terror(tLocalHostReadertApacheConfigWritableLoadercBs)eZdZd�Zd�Zd�ZRS(uRManages a writable object represented by a single config file.

    Args:
        parser (:class:`apacheconfig.ApacheConfigParser`): compiled parser
            to use when loading configuration directives.
        options (dict): keyword args of options to set for loader. Should be
            same set of options passed to parser.
    cKsJ||_t|�|_d|jkr:|jd|_nt�|_dS(Nureader(t_parsertdictt_optionst_readerR(tselftparsertoptions((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt__init__s
	cCs2|jj|��}|j|j��SWdQXdS(u^Loads config file into a raw modifiable AST.

        Args:
            filepath (Text): path of config file to load. Expects UTF-8
                encoding.

        Returns:
            :class:`apacheconfig.ListNode` AST containing parsed config file.

        Raises:
            IOError: If there is a problem opening the file specified.
        N(Rtopentloadstread(Rtfilepathtf((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pytload#s
cCs"|jj|�}t||j�S(u�Loads config text into a raw modifiable AST.

        Args:
            text (Text): (Text) containing the configuration to load.

        Returns:
            :class:`apacheconfig.ListNode` AST containing parsed config.
        (RtparsetListNode(Rttexttast((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR
3s	(t__name__t
__module__t__doc__RRR
(((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRs		cCs8t|dt�rd|St|dt�r4d|S|S(u?If the `word` is a Quoted string, restores it to original.
    uis_single_quotedu'%s'uis_double_quotedu"%s"(tgetattrtFalse(tword((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt_restore_original@s
tAbstractASTNodecBs2eZdZejd��Zejd��ZRS(u�Generic class containing data that represents a node in the config AST.

    There are three subclasses: :class:`apacheconfig.ListNode`,
    :class:`apacheconfig.BlockNode`, and :class:`apacheconfig.LeafNode`.

    Every AST should have a :class:`apacheconfig.ListNode` at its root. A
    :class:`apacheconfig.ListNode` or :class:`apacheconfig.BlockNode` can have
    other :class:`apacheconfig.BlockNode`s and
    :class:`apacheconfig.LeafNode`s as children.

    In general, a tree might look like::

                      +----------+
                      | ListNode |
                      +----------+
                       |        |
                       v        v
               +---------+    +--------+
               |BlockNode|    |LeafNode|
               +---------+    +--------+
                |       |
                v       v
        +---------+   +--------+
        |BlockNode|   |LeafNode|
        +---------+   +--------+
           |
           v
          etc...

    Both :class:`apacheconfig.ListNode` and :class:`apacheconfig.BlockNode`
    may contain an ordered list of other nodes, but
    :class:`apacheconfig.LeafNode`s are terminal.

    Each :class:`apacheconfig.AbstractASTNode` class also has their own
    properties and functions. In general, :class:`apacheconfig.LeafNode`
    corresponds with scalar data such as directives/options or comments.
    :class:`apacheconfig.BlockNode` corresponds with an open/close tag and
    its contents.
    cCsdS(uDumps contents of this node.

        Returns:
            (Text) with the contents of this node, as in a config file.
        N((R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pytdumpttcCsdS(uAObject typestring as defined by the apacheconfig parser.
        N((R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt
typestring|R(RRRtabctabstractmethodRtabstractpropertyR (((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRJs(RcBs�eZdZd�Zed��Zd�Zd�Zd�Zd�Z	d�Z
ed��Zed	��Z
e
jd
��Z
RS(u�Creates object for an ordered list of ``apacheconfig.AbstractASTNode``s.

    Every configuration file's root should be a ``apacheconfig.ListNode``.
    Children can be ``apacheconfig.BlockNode`` or ``apacheconfig.LeafNode``.

    Args:
        raw (list): Data returned from ``apacheconfig.parser``. To construct
            from a string containing config directives, use the `parse` factory
            function.

    Raises:
        ApacheConfigError: If `raw` is not formed as expected. In particular,
            if `raw` is too short, or has the wrong `typestring`, or if
            one of this list's children is not formed as expected.
    cCst|�dkr$tjd��n|d|_|jdkrRtjd��ng|_d|_||_x�|dD]�}t|tj	�r�|j
�r�||_qx|ddkr�|jjt||��qx|ddkr�tjd	��qx|jjt
|��qxWdS(
NiupExpected properly-formatted `contents` data returned from ``apacheconfig.parser``. Got a list that is too short.iucontentsu�Expected properly-formatted `contents` data returned from ``apacheconfig.parser``. First element of data is not "contents" typestring.uiublocku�Expected properly-formatted `contents` data returned from ``apacheconfig.parser``. Got `contents` data as a child of this `contents` data.(tlenRtApacheConfigErrort_typet	_contentst_trailing_whitespaceRt
isinstancetsixtstring_typestisspacetappendt	BlockNodetLeafNode(RtrawR	telem((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR�s&
			cCs|j|�}|||�S(uaFactory for :class:`apacheconfig.ListNode` from a config string.

        Args:
            raw_str (str): Config string to parse.
            parser (:class:`apacheconfig.ApacheConfigParser`): parser object
                to use.
        Returns:
            :class:`apacheconfig.ListNode` containing data parsed from
            ``raw_str``.
        (R(tclstraw_strR	R0((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR�scCs|dks|t|�kr-td��n|jj|�}t|�dkrctjd��n|jj|�d}|ddkr�t||j�}nt|�}|dkr�|jr�d|jdj	kr�|jdj	}d||jd_	n|jj
||�|S(uJParses and adds child element at given index.

        Parses given string into an :class:`apacheconfig.AbstractASTNode`
        object, then adds to list at specified index.

        Args:
            index (int): index of list at which to insert the node.
            raw_str (str): string to parse. The parser will automatically
                determine whether it's a :class:`apacheconfig.BlockNode` or
                :class:`apacheconfig.LeafNode`.

        Returns:
            The :class:`apacheconfig.AbstractASTNode` created from parsing
                ``raw_str``.

        Raises:
            ApacheConfigError: If `raw_str` cannot be parsed into a
                :class:`apacheconfig.BlockNode` or
                :class:`apacheconfig.LeafNode`.
            IndexError: If `index` is not within bounds [0, len(self)].
        iusupplied index is out of rangeiu4Given raw_str should be parsable into a single node.iublocku
(R$t
IndexErrorRRRR%R.R/R't
whitespacetinsert(RtindexR3R0tnodetwhitespace_after((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pytadd�scCs=|dks|t|�kr-td��n|jj|�S(u(Removes node from supplied index.

        Args:
            index (int): index of node to remove from list.

        Returns:
            The :class:`apacheconfig.AbstractASTNode` that was removed.

        Raises:
            IndexError: If `index` is not within bounds [0, len(self)).
        iusupplied index is out of range(R$R4R'tpop(RR7((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pytremove�scCs
t|j�S(u1Number of :class:`apacheconfig.ASTNode` children.(R$R'(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt__len__�scCs
t|j�S(u5Iterator over :class:`apacheconfig.ASTNode` children.(titerR'(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt__iter__�scCs0djg|jD]}|j�^q�|jS(Nu(tjoinR'Rttrailing_whitespace(Rtitem((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRs(cCs|jS(uiSee base class.

        Returns:
            ``"contents"`` for :class:`apacheconfig.ListNode`.
        (R&(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR scCs|jS(uTrailing whitespace after this list of config items.

        For instance, the following valid configuration::

            \tkey value # comment\n

        will be processed into something like::

            ListNode([
                LeafNode(['\t', 'key', ' ', 'value']),
                LeafNode([' ', '# comment']),
                '\n'])

        where the ``trailing_whitespace`` property would return '\n'.

        Returns:
            String containing trailing whitespace after this list in the
            config file.
        (R((R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRAscCs
||_dS(u�Sets trailing whitespace after this list of config items.

        Args:
            value (Text): Trailing whitespace for this list of config items.
        N(R((Rtvalue((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRA&s(RRRRtclassmethodRR:R<R=R?RtpropertyR RAtsetter(((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR�s		.					R/cBs�eZdZd�Zed��Zed��Zejd��Zed��Z	ed��Z
ed��Zed��Zejd	��Zd
�Z
d�Zd�ZRS(
uaCreates object containing a simple list of tokens.

    Also manages any preceding whitespace. Can represent a key/value option,
    a comment, or an include/includeoptional directive.

    Examples of what LeafNode might look like for different directives::

        "option"
            name: "option", value: None, whitespace: ""
        "include relative/path/*"
            name: "include", value: "relative/path/*", whitespace: ""
        "\n  option = value"
            name: "option", value: "value", whitespace: "\n  "
        "# here is a comment"
            name: "# here is a comment", value: None, whitespace: ""
        "\n  # here is a comment"
            name: "# here is a comment", value: None, whitespace: "\n  "

    To construct from a raw string, use the `parse` constructor. The regular
    constructor receives data from the internal apacheconfig parser.

    Args:
        raw (list): Raw data returned from ``apacheconfig.parser``.

    Raises:
        ApacheConfigError: If `raw` is not formed as expected. In particular,
            if `raw` is too short or has the wrong `typestring`.
    cCs�t|�dkr$tjd��n|d|_|jdksO|jdkratjd��nt|d�|_d|_t|�dkr�|dj�r�|d|_t|d�|_ndS(	NiueExpected properly-formatted data returned from ``apacheconfig.parser``. Got a list that is too short.iucontentsublocku�Expected properly-formatted data returned from ``apacheconfig.parser``. First element of data cannot be "contents" or "block" typestring.iu(R$RR%R&ttuplet_rawt_whitespaceR,(RR0((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRNs
	"
cCs|jS(u�See base class.

        Returns:
            The typestring (as defined by the apacheconfig parser) for
            this node. The possible values for this are ``"comment"``,
            ``"statement"``, ``"include"``, ``"includeoptional"``.
        (R&(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR _s	cCs|jS(uYWhitespace preceding this element in the config file.

        For example::

            LeafNode('\n  option value').whitespace => "\n  "
            LeafNode('option value').whitespace => ""
            LeafNode('\n  # comment').whitespace => "\n  "

        Returns:
            String containing preceding whitespace for this node.
        (RI(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR5js
cCs
||_dS(u�Sets whitespace preceding this element in the config file.

        Args:
            value (str): New whitespace to set.
        N(RI(RRC((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR5yscCs|j|�}||d�S(u�Factory for :class:`apacheconfig.LeafNode` from a config string.

        Args:
            raw_str (Text): The text to parse, as a unicode string.
            parser (:class:`apacheconfig.ApacheConfigParser`): specify the
                parser to use. Can be created by ``native_apache_parser()``.
        Returns:
            :class:`apacheconfig.LeafNode` containing metadata parsed from
            ``raw_str``.
        i(R(R2R3R	R0((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR�scCs|jdS(u�Returns the name of this node.

        The name is the first non-whitespace token in the directive. Cannot be
        written. For comments, is the entire comment.
        i(RH(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pytname�scCst|j�dkS(u�Returns ``True`` if this :class:`apacheconfig.LeafNode` has a value.

        ``LeafNode`` objects don't have to have a value, like option/value
        directives with no value, or comments.
        i(R$RH(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt	has_value�scCs|js
dS|jdS(uReturns the value of this item as a unicode string.

        The "value" is anything but the name. Can be overwritten.
        Ni����(RKRH(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRC�s	cCs@|js"|jd|f|_n|jdd!|f|_dS(u�Sets for the value of this item.

        Args:
            value (Text): string to set new value to.

          .. todo:: (sydneyli) convert `value` to quotedstring when quoted
        u ii����N(RKRH(RRC((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRC�s		cCs0|jdjg|jD]}t|�^q�S(Nu(R5R@RHR(RR((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR�scCsLg|jD]}t|�^q
}dt|jj�t|jg|�fS(Nu%s(%s)(RHRtstrt	__class__RR&(RRtcontents((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt__str__�s"cCsRg|jD]}t|�^q
}dtj|jj�tj|jg|�fS(Nu%s(%s)(RHRR*t	text_typeRMRR&(RRRN((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt__unicode__�s"(RRRRRER R5RFRDRRJRKRCRRORQ(((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR/0s				

		R.cBs�eZdZd�Zed��Zed��Zed��Zej	d��Zed��Z
ed��Zej	d��Zd	�ZRS(
u�Creates object containing data for a block.

    Manages any preceding whitespace before the opening block tag, and
    superclass :class:`apacheconfig.ListNode` methods will manipulate
    block contents.

    Args:
        raw (list): Data returned from ``apacheconfig.parser``. To construct
            from a string containing a config block, use the `parse` factory
            function.

    Raises:
        ApacheConfigError: If `raw` is not formed as expected. In particular,
            if `raw` is too short, or has the wrong `typestring`, or if
            data for this block or one of this block's children is not formed
            as expected.
    cCst|�dkr$tjd��nd|_|d|_|jdkr[tjd��nd}t||tj�r�||j�r�|||_|d7}nt	d
||�|_
|d	|_d|_
||drtt|�j||d|�n|d|_dS(NiueExpected properly-formatted data returned from ``apacheconfig.parser``. Got a list that is too short.uiublockuxExpected properly-formatted data returned from ``apacheconfig.parser``. First element of data is not "block" typestring.iu	statementi����(u	statement(R$RR%RIR&R)R*R+R,R/t	_full_tagt
_close_tagtNoneR'tsuperR.R(RR0R	tstart((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR�s$	
&


	$cCs |j|�}||d|�S(ubFactory for :class:`apacheconfig.BlockNode` from a config string.

        Args:
            raw_str (str): The text to parse.
            parser (:class:`apacheconfig.ApacheConfigParser`): parser object
                to use.
        Returns:
            :class:`apacheconfig.BlockNode` containing metadata parsed from
            ``raw_str``.
        i(R(R2R3R	R0((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR�scCs
|jjS(u�Tag name for this block.

        Returns:
            Tag name for this blog as a string. For instance,
            ``<block details>\n</block>`` has tag ``"block"``.
        (RRRJ(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyttagscCs
|jjS(u�Arguments of this block.

        Returns:
            Arguments for this block as a string. For instance,
            ``<block lots of 	details>\n</block>`` returns arguments
            ``"lots of 	details"``. Can be overwritten.
        (RRRC(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt	argumentss	cCs||j_dS(uSets or overwrites arguments for this block.

        Args:
            arguments (str): New arguments for this block.
        N(RRRC(RRX((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyRXscCs|jS(ugSee base class.

        Returns:
            ``"block"`` for :class:`apacheconfig.BlockNode`.
        (R&(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR "scCs|jS(u�Whitespace preceding this element in the config file.

        Returns:
            String containing preceding whitespace for this node.
        (RI(R((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR5+scCs
||_dS(u�Sets whitespace preceding this element in the config file.

        Args:
            value (str): New whitespace to set.
        N(RI(RRC((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR54scCsa|jdkr)d|j|jj�fStt|�j�}d|j|jj�||jfS(Nu%s<%s/>u
%s<%s>%s</%s>(R'RTR5RRRRUR.RS(RRN((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR=s
(
RRRRRDRRERWRXRFR R5R(((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyR.�s	
				(t
__future__RR!R*tapacheconfigRtapacheconfig.readerRtobjectRRt
add_metaclasstABCMetaRRR/R.(((sE/usr/local/aegis/PythonLoaderTemp/third_party/apacheconfig/wloader.pyt<module>s/	
7��

Youez - 2016 - github.com/yon3zu
LinuXploit